Data deletion method and device, electronic equipment and storage medium
By using the target physical switch to control the data deletion permission during the data deletion process, the problem of insufficient data deletion security in the prior art is solved, and higher data security and reduced risk of error deletion are achieved.
Patent Information
- Application Number
- CN202411515548.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-01-10
AI Technical Summary
The prior art is difficult to distinguish between user accidental deletion and malicious deletion during data deletion, which makes it difficult to guarantee the security of stored data, especially when facing threats such as computer viruses.
By introducing a target physical switch into the target device, its status is obtained to determine whether to allow deletion of data. If the status is not allowed, deletion is prohibited, and if the status is allowed, data deletion is performed.
Enhanced data security, reduce the risk of error deletion, and prevent data loss caused by malicious deletion and viruses.
Smart Images

Figure CN119293824A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing, and specifically relates to a data deletion method, device, electronic device and storage medium. Background Art
[0002] At present, with the development of Internet technology, various computer viruses emerge in an endless stream. Some viruses will delete important stored data, which will bring serious consequences. Therefore, in order to ensure the security of stored data, a standardized data deletion method is needed.
[0003] The related technology generally sets operation permissions for important data operations, and only users with deletion permissions can delete important data. However, this method of related technology is implemented through permission control by software, and there are still certain risks in permission control at the software level. For example, if a user with deletion permission deletes important data, it is difficult to distinguish whether the user deleted it accidentally or maliciously, and the security of stored data is still difficult to guarantee. Summary of the invention
[0004] The embodiments of the present application provide a data deletion method, device, electronic device and storage medium, which can enhance the security of stored data and reduce the risk of accidental deletion.
[0005] In a first aspect, an embodiment of the present application provides a data deletion method, the method comprising: The target device obtains a data deletion operation, where the data deletion operation is used to delete target data; The target device acquires the state of the target physical switch according to the data deletion operation; the state of the target physical switch is used to indicate whether the deletion of the target data is allowed; When the state of the target physical switch indicates that the target data cannot be deleted, the target device is prohibited from deleting the target data; In a case where the state of the target physical switch indicates that deletion of the target data is permitted, the target device deletes the target data.
[0006] In a second aspect, an embodiment of the present application provides a data deletion device, including: An acquisition module, used to acquire a data deletion operation, wherein the data deletion operation is used to delete target data; according to the data deletion operation, acquire a state of a target physical switch; the state of the target physical switch is used to indicate whether the target data is allowed to be deleted; The processing module is used to prohibit deleting the target data when the state of the target physical switch indicates that deleting the target data is not allowed; and to delete the target data when the state of the target physical switch indicates that deleting the target data is allowed.
[0007] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores a program or instruction running on the processor, and when the program or instruction is executed by the processor, the steps of the method described in the first aspect are implemented.
[0008] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0009] According to a fifth aspect, a computer program product comprises a computer program, wherein when the computer program is executed, the method according to the first aspect is implemented.
[0010] In an embodiment of the present application, a target device obtains a data deletion operation, and the data deletion operation is used to delete target data; the target device obtains the state of a target physical switch according to the data deletion operation; the state of the target physical switch is used to indicate whether the target data is allowed to be deleted; when the state of the target physical switch indicates that the target data is not allowed to be deleted, the target device prohibits the deletion of the target data; when the state of the target physical switch indicates that the target data is allowed to be deleted, the target device deletes the target data. In this process, when the state of the target physical switch indicates that the target data is not allowed to be deleted, the target device prohibits the deletion of the target data; when the state of the target physical switch indicates that the target data is allowed to be deleted, the target device can delete the target data. In this way, through the protective function of the target physical switch, the security of stored data can be enhanced and the risk of accidental deletion can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 is a flow chart of a data deletion method provided by an embodiment of the present application; Figure 2 is a flow chart of another data deletion method provided by an embodiment of the present application; Figure 3 is a schematic diagram of a method for deleting backup data provided in an embodiment of the present application; Figure 4 It is a structural block diagram of a data deletion device provided in an embodiment of the present application; Figure 5 It is a structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0012] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0013] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0014] The data deletion method provided in the embodiment of the present application can be executed by a target device, wherein the target device can be an electronic device. That is to say, the data deletion method provided in the embodiment of the present application can be executed by an electronic device, wherein the electronic device can be a terminal device such as a desktop computer, a laptop computer, a mobile phone, a tablet, or a server, such as an independent physical server or a cloud server capable of cloud computing. In the case where the target device is a server, the target data stored in the server is backup data, and the server can be a server in a data center.
[0015] The data deletion method provided in the embodiment of the present application is applied to the situation of deleting the stored data, wherein the stored data may be important data or sensitive data stored in the electronic device.
[0016] The data deletion method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0017] See also Figure 1 , Figure 1 1 is a flow chart of a data deletion method provided by an embodiment of the present application. Figure 1 As shown, the method comprises the following steps: Step 110, the target device obtains a data deletion operation, where the data deletion operation is used to delete target data; The data deletion operation may be a data deletion operation triggered locally on the target device or a data deletion operation triggered remotely. The target data may be backup data, redundant data, or other customized data.
[0018] In the case where the data deletion operation is a data deletion operation triggered locally on the target device, the data deletion operation may be a data deletion operation performed by a user of the target device, for example, the user clicks on a target object displayed on the display screen of the target device with a mouse or finger to delete the target data associated with the target object. Of course, the data deletion operation may also be an operation automatically triggered within the target device without user intervention, for example, when the target data is backup data within the target device, a regular automatic deletion operation may be set for the backup data within the target device, for example, the backup data within the target device may be automatically deleted every other month, in which case the data deletion operation is an operation of regularly deleting backup data within the target device.
[0019] In the case where the data deletion operation is a remotely triggered data deletion operation, the target device can receive the data deletion operation issued by the network side device and perform a corresponding operation on the target data. In this case, the data deletion operation is a data deletion operation issued by the network side device.
[0020] Step 120, the target device obtains the state of the target physical switch according to the data deletion operation; the state of the target physical switch is used to indicate whether the target data is allowed to be deleted; In an embodiment of the present application, the target device can directly obtain the state of the target physical switch according to the data deletion operation. In the case where the target data has a validity period, the validity period of the target data can also be first obtained according to the data deletion operation to determine whether the target data is expired, and the state of the target physical switch can be obtained when the target data is still within the validity period. Among them, obtaining the state of the target physical switch can be achieved by means of a sensor. For example, the sensor can inform the processor in the target device of the state of the sensed target physical switch, and then control the operation of the target data through the processor, that is, delete the target data or prohibit the deletion of the target data. In one embodiment of the present application, the target device includes a sensor and a processor. The acquisition of the state of the target physical switch includes: the sensor acquires the state of the target physical switch; the sensor transmits the state of the target physical switch to the processor; the processor receives the state of the target physical switch. In this way, the state of the target physical switch can be quickly acquired through the sensor, so that the target data can be conveniently operated according to this state later.
[0021] In an embodiment of the present application, the target physical switch is associated with the target data, and the state of the target physical switch may indicate the state of the target data, and the state of the target data may include a locked state and an unlocked state. The target physical switch may have a first state and a second state. The first state indicates that the target data is in a locked state, and deletion of the target data is not allowed; the second state indicates that the target data is in an unlocked state, and deletion of the target data is allowed. Among them, the state of the target physical switch can be obtained by whether the target physical switch is turned on. For example, the target physical switch in the first state may indicate that the target physical switch is not turned on, and the target physical switch in the second state may indicate that the target physical switch is turned on. In addition, the state of the target physical switch can also be distinguished by color. This allows the operator to quickly realize the current state of the target physical switch.
[0022] Among them, the form of the target physical switch can be set as needed, for example, the target physical switch can be presented in the form of a button, or in the form of a button combined with an indicator light. Taking the target physical switch as a button as an example, if the target physical switch is turned on, it can indicate that the target physical switch is in the first state, and if the target physical switch is not turned on, it can indicate that the target physical switch is in the second state. Of course, the target physical switch can be a red button at one end and a green button at the other end. The red button and the green button can be mutually exclusive, that is, only one color of button can be in working state at a time. When the red button is pressed, the green button is not pressed. At this time, the target physical switch is in the first state, indicating that the target data is in a locked state and the target data cannot be deleted; when the green button is pressed, the red button is not pressed. At this time, the target physical switch is in the second state, indicating that the target data is in an unlocked state, allowing the target data to be deleted. Similarly, if the target physical switch is presented in the form of a button combined with an indicator light, pressing the button can change the color of the indicator light. For example, the indicator light is initially in a red light state, and the indicator light can be changed to a green light state by pressing the button once, and the indicator light can be switched back to a red light state by pressing the button once again. If the indicator light is green, it indicates that the target data is in an unlocked state and can be deleted; if the indicator light is red, it indicates that the target data is in a locked state and cannot be deleted.
[0023] Step 130, when the state of the target physical switch indicates that the target data cannot be deleted, the target device is prohibited from deleting the target data; The target physical switch is in the first state, the target data is in a locked state, and the target data is not allowed to be deleted. It should be understood that in the embodiment of the present application, not allowing the target data to be deleted means that no device is allowed to delete the target data.
[0024] Step 140: When the state of the target physical switch indicates that the target data can be deleted, the target device deletes the target data.
[0025] The target physical switch is in the second state, the target data is in an unlocked state, and the target data is allowed to be deleted. It should be understood that in the embodiment of the present application, allowing the target data to be deleted means allowing the party initiating the data deletion operation to delete the target data.
[0026] In an embodiment of the present application, a target device obtains a data deletion operation, and the data deletion operation is used to delete target data; the target device obtains the state of a target physical switch according to the data deletion operation; the target physical switch is used to indicate whether the target data is allowed to be deleted; when the state of the target physical switch indicates that the target data is not allowed to be deleted, the target device prohibits the deletion of the target data; when the state of the target physical switch indicates that the target data is allowed to be deleted, the target device deletes the target data. In this process, when the state of the target physical switch indicates that the target data is not allowed to be deleted, the target device prohibits the deletion of the target data; when the state of the target physical switch indicates that the target data is allowed to be deleted, the target device can delete the target data. In this way, through the protective function of the target physical switch, the security of stored data can be enhanced and the risk of accidental deletion can be reduced.
[0027] See also Figure 2 , Figure 2 FIG. 1 is a flow chart of another data deletion method provided by an embodiment of the present application. Figure 2 As shown, the method comprises the following steps: Step 210: The target device obtains a data deletion operation, where the data deletion operation is used to delete target data; In the embodiment of the present application, the target device may receive a data deletion operation, which may come from the target device itself or from a network-side device.
[0028] Step 220, the target device obtains the validity period of the target data according to the data deletion operation; In an embodiment of the present application, the validity period of the target data may also be the storage period of the target data, and the validity period may be preset, for example, the validity period of the target data is 30 days, 60 days or 180 days. The target data within the validity period may continue to be saved for subsequent use, and the target data that is not within the validity period (i.e., expired target data) may be deleted to free up storage space. Taking the target data as backup data as an example, the storage period of the backup data (e.g., 30 days) may be set. The storage period is the current time minus the time when the data is backed up. For example, if the data is backed up on 2024-6-9, then it will have been saved for 30 days on 2024-7-9.
[0029] Step 230, when the target data is still within the validity period, obtaining the state of the target physical switch; In the embodiment of the present application, when the target data is not currently within the validity period, that is, when the target data has expired, the target data may be deleted.
[0030] In an embodiment of the present application, the target device may include a sensor and a processor. The process of obtaining the state of the target physical switch may include: the sensor obtaining the state of the target physical switch; the sensor transmitting the state of the target physical switch to the processor; and the processor receiving the state of the target physical switch.
[0031] Step 240: When the state of the target physical switch indicates that the target data cannot be deleted, the target device is prohibited from deleting the target data; Step 250: When the state of the target physical switch indicates that the target data can be deleted, the target device deletes the target data.
[0032] In an embodiment of the present application, when the state of the target physical switch indicates that the target data is not allowed to be deleted, the target device is prohibited from deleting the target data; when the state of the target physical switch indicates that the target data can be deleted, the target device can delete the target data. In this way, through the protective effect of the target physical switch, the security of stored data can be enhanced and the risk of accidental deletion can be reduced. In addition, in the process of obtaining the state of the target physical switch, by first obtaining the validity period of the target data, the state of the target physical switch will be obtained only when the target data is still within the validity period. When the target data is not within the validity period, the state of the target physical switch will not be obtained, but the target data will be directly deleted. In this way, it can be ensured that the state of the target physical switch is only obtained for target data that has not expired, and then decide whether to delete the target data, without having to obtain the state of the target physical switch for expired target data, thereby improving the pertinence of the data deletion operation and avoiding meaningless and complicated operations.
[0033] It is important to understand that Figure 1 to Figure 2 The explanations of the same or corresponding steps in the above may refer to each other. For example, Figure 1 Step 110 explained in the example may be applicable to Figure 2 Step 210 in .
[0034] The following takes the target data as backup data as an example to further illustrate the data deletion method provided by the embodiment of the present application. The data deletion method provided by the embodiment of the present application adopts a combination of online and offline methods, which can enhance data security and prevent viruses and malicious data deletion.
[0035] In the embodiment of the present application, a strict policy can be set for the retention of backup data, and deletion is allowed only when corresponding conditions are met. The specific data retention security policy process is as follows: 1. Set the retention period of the backup data (for example, 30 days). The retention period is the current time minus the time when the data was backed up. For example, if the data is backed up on 2024-6-9, it will have been saved for 30 days on 2024-7-9.
[0036] 2. The system sets a policy that automatically deletes data that exceeds the retention period (for example, more than 30 days) to free up storage space.
[0037] 3. The system sets a policy for data within the retention period (for example, less than 30 days). If you need to delete the data, you need to determine the status of the target physical switch. Only when the target physical switch is "green - deletion allowed" can you delete the "data within the retention period" online. If the target physical switch is "red - deletion prohibited", no one can delete the "data within the period" online.
[0038] The target physical switch is described as follows: Add a physical switch on the hardware platform of the backup storage / library device (the switch status is: green - deletion allowed; red - deletion prohibited). The switch is manually controlled offline and is usually in the "red - deletion prohibited" state. The opening of the physical switch requires a strict offline approval process, and authorized personnel must enter the equipment room of the computer room to operate.
[0039] Figure 3 Schematic diagram of the method for deleting backup data provided by the embodiment of the present application. The entire operation process of backing up data can be as follows: Figure 3 As shown. In the process of regularly deleting historical backup data, you can first check whether the backup data is expired. If the backup data is expired, you can directly delete the expired backup data; if the backup data is not expired, you can further check the state of the target physical switch. For example, if the target physical switch is in the first state, it means that the target physical switch is not turned on, and if the target physical switch is in the second state, it means that the target physical switch is turned on. The state of the target physical switch can be obtained by checking whether the target physical switch is turned on. If the target physical switch is turned on, the backup data can be deleted; if the target physical switch is not turned on, the backup data is prohibited from being deleted.
[0040] It can be seen that the embodiment of the present application sets a storage period for backup data, and the backup data can only be deleted during the storage period by "offline physical switch + online operation". In this way, the backup data is safer and prevents malicious operations and abnormal deletion of data by viruses.
[0041] Figure 4 is a structural block diagram of a data deletion device provided in an embodiment of the present application. Figure 4 The data deletion device 400 provided in the embodiment of the present application includes: an acquisition module 410 and a processing module 420. Among them: The acquisition module 410 is used to acquire a data deletion operation, wherein the data deletion operation is used to delete target data; according to the data deletion operation, acquire the state of a target physical switch; the target physical switch is used to indicate whether the target data is allowed to be deleted; The processing module 420 is configured to prohibit deleting the target data if the state of the target physical switch indicates that deletion of the target data is not allowed; and to delete the target data if the state of the target physical switch indicates that deletion of the target data is allowed.
[0042] In the data deletion device provided in the embodiment of the present application, when the state of the target physical switch indicates that the target data cannot be deleted, the target device is prohibited from deleting the target data; when the state of the target physical switch indicates that the target data can be deleted, the target device can delete the target data. In this way, through the protection function of the target physical switch, the security of the stored data can be enhanced and the risk of accidental deletion can be reduced.
[0043] In one embodiment of the present application, in the process of obtaining the state of the target physical switch according to the data deletion operation, the acquisition module 410 is specifically used to: obtain the validity period of the target data according to the data deletion operation; and obtain the state of the target physical switch when the target data is still within the validity period. In this way, the combination of online and offline methods can enhance data security and prevent viruses and malicious data deletion.
[0044] In one embodiment of the present application, the target data is backup data.
[0045] In one embodiment of the present application, the data deletion operation is an operation of regularly deleting backup data in the target device. The target device may be a server set up in a data center.
[0046] In one embodiment of the present application, the data deletion operation is a data deletion operation issued by a network side device.
[0047] In one embodiment of the present application, the data deletion device includes a sensor and a processor. In the process of acquiring the state of the target physical switch, the acquisition module 410 is specifically used to: The sensor acquires the state of the target physical switch; the sensor transmits the state of the target physical switch to the processor; and the processor receives the state of the target physical switch.
[0048] like Figure 5As shown, an embodiment of the present application provides an electronic device 500, and the electronic device 500 includes: a processor 510 and a memory 520, and the memory 520 stores a program, and when the program is executed by the processor 510, the steps of any of the methods described above are implemented. For example, when the program is executed by the processor 510, the following process is implemented: the target device obtains a data deletion operation, and the data deletion operation is used to delete the target data; the target device obtains the state of the target physical switch according to the data deletion operation; the target physical switch is used to indicate whether the target data is allowed to be deleted; when the state of the target physical switch indicates that the target data is not allowed to be deleted, the target device prohibits the deletion of the target data; when the state of the target physical switch indicates that the target data is allowed to be deleted, the target device deletes the target data.
[0049] In the electronic device provided in the embodiment of the present application, when the state of the target physical switch indicates that the target data cannot be deleted, the target device is prohibited from deleting the target data; when the state of the target physical switch indicates that the target data can be deleted, the target device can delete the target data. In this way, through the protection function of the target physical switch, the security of the stored data can be enhanced and the risk of accidental deletion can be reduced.
[0050] An embodiment of the present application also provides a computer-readable storage medium, on which a program or instruction is stored. When the program or instruction is executed, the steps in the data deletion method provided in any embodiment of the present application are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0051] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0052] In the readable storage medium provided in the embodiment of the present application, when the state of the target physical switch indicates that the target data cannot be deleted, the target device is prohibited from deleting the target data; when the state of the target physical switch indicates that the target data can be deleted, the target device can delete the target data. In this way, through the protection function of the target physical switch, the security of the stored data can be enhanced and the risk of accidental deletion can be reduced.
[0053] In addition, an embodiment of the present application also provides a computer program product, including a computer program, which implements the data deletion method provided by any embodiment of the present application when executed.
[0054] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0055] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0056] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A data deletion method, characterized in that: include: The target device obtains a data deletion operation, where the data deletion operation is used to delete target data; The target device obtains the state of the target physical switch according to the data deletion operation; The state of the target physical switch is used to indicate whether the target data is allowed to be deleted; When the state of the target physical switch indicates that the target data cannot be deleted, the target device is prohibited from deleting the target data; In a case where the state of the target physical switch indicates that deletion of the target data is permitted, the target device deletes the target data.
2. The method according to claim 1, characterized in that The target device obtains the state of the target physical switch according to the data deletion operation, including: The target device obtains the validity period of the target data according to the data deletion operation; In a case where the target data is still within the validity period, a state of the target physical switch is acquired.
3. The method according to claim 1, characterized in that The target data is backup data.
4. The method according to claim 3, characterized in that The data deletion operation is an operation of regularly deleting backup data in the target device, and the target device is a server set up in a data center.
5. The method according to any one of claims 1 to 3, characterized in that: The data deletion operation is a data deletion operation issued by a network side device.
6. The method according to claim 1 or 2, characterized in that: The target device includes a sensor and a processor; the step of obtaining the state of the target physical switch includes: The sensor acquires the state of the target physical switch; The sensor transmits the state of the target physical switch to the processor; The processor receives a state of the target physical switch.
7. A data deletion device, characterized in that: include:: An acquisition module, used to acquire a data deletion operation, wherein the data deletion operation is used to delete target data; and acquire a state of a target physical switch according to the data deletion operation; The state of the target physical switch is used to indicate whether the target data is allowed to be deleted; A processing module, configured to prohibit deleting the target data if the state of the target physical switch indicates that deleting the target data is not allowed; In a case where the state of the target physical switch indicates that deletion of the target data is permitted, the target data is deleted.
8. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction running on the processor, and when the program or instruction is executed by the processor, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium, characterized in that: The medium stores a program or an instruction, and when the program or the instruction is executed, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The method comprises a computer program, which implements the method according to any one of claims 1 to 6 when being executed.
Citation Information
Patent Citations
Information management method, information management device and terminal
CN106453810A
Method, device, equipment and system for preventing data from being deleted mistakenly and storage medium
CN115481430A