Memory processing method, device, storage medium and equipment
Through the verification and backup mechanism, the problems of accidental deletion and low efficiency during the deletion and recovery process of SAN memory partitions are solved, and more accurate and efficient memory partition management is achieved.
Patent Information
- Application Number
- CN202011388685.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-02
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2040-12-02
AI Technical Summary
In the existing technology, accidental deletions and omissions are prone to occur when deleting and restoring storage area network (SAN) memory partitions, and the recovery process is inefficient, requires manual operations, and is error-prone.
Obtain the attribute information of the target memory partition and verify its validity. If it is valid, backup and delete it to remove the access relationship between devices; if a recovery request is received, the access relationship is restored based on the backup memory partition to avoid manual backup and recovery operations. .
It improves the accuracy of memory partition deletion and recovery, reduces accidental deletions, improves work efficiency, and avoids manual errors and omissions.
Smart Images

Figure CN112445655B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a memory processing method, device, storage medium and equipment. Background Art
[0002] Storage Area Network (SAN) is widely used in data centers to solve the growing data storage and management problems by combining hardware storage technology and network technology. The memory partitioning (zone) function of SAN switches is similar to the VLAN (Virtual Local Area Network) function on Ethernet switches. It logically divides the devices connected in the SAN network into different memory partitions (zones), so that devices in the same memory partition (zone) can access each other, and devices that are not divided into the same memory partition (zone) are isolated from each other.
[0003] In the prior art, when deleting a memory zone, it is easy to delete by mistake or omission, and it is not easy to find. In addition, the user needs to log in to the SAN switch to manually back up the memory zone, and when restoring the memory zone, the user needs to manually write a rollback script, which is time-consuming, labor-intensive, error-prone, and inefficient. Summary of the invention
[0004] The technical problem to be solved by the embodiments of the present application is to provide a memory processing method, device, storage medium and equipment, through which the target memory partition can be effectively deleted and the accuracy of recovering the deleted target memory partition can be improved.
[0005] An embodiment of the present application provides a memory processing method, including:
[0006] Acquire a target memory partition to be deleted in a target object, and acquire attribute information of the target memory partition; the target memory partition includes relationship indication information of at least two devices connected to the target object, the relationship indication information is used to indicate that there is an access relationship between the at least two devices, and the attribute information of the target memory partition is used to reflect at least one of the deletion permission of the target memory partition and the partition identifier of the target memory partition;
[0007] Verifying the validity of the target memory partition according to the attribute information of the target memory partition;
[0008] If the target memory partition is valid, backing up the target memory partition to obtain a backup memory partition, and deleting the target memory partition to release the access relationship between the at least two devices;
[0009] If a request for restoring the access relationship between the at least two devices is received, the target memory partition is restored according to the backup memory partition to restore the access relationship between the at least two devices.
[0010] Wherein, the attribute information is used to reflect the deletion permission of the target memory partition;
[0011] The verifying the validity of the target memory partition according to the attribute information of the target memory partition includes:
[0012] Obtaining a device identifier of a terminal device that requests to delete the target memory partition;
[0013] Verifying, based on the device identifier, whether the terminal device has deletion authority for the target memory partition;
[0014] If the terminal device has deletion authority for the target memory partition, it is determined that the target memory partition is valid.
[0015] The verifying, according to the device identifier, whether the terminal device has the deletion permission for the target memory partition includes:
[0016] Querying the occupation status of the change lock of the target memory partition; the change lock is used to lock the change operation on the target memory partition;
[0017] If the occupation state of the change lock of the target memory partition is in an occupied state, obtaining a device identifier of an occupying terminal that occupies the change lock;
[0018] If the device identification of the terminal device is the same as the device identification of the occupying terminal, it is determined that the terminal device has the deletion authority for the target memory partition.
[0019] Wherein, the attribute information is used to reflect the partition identifier of the target memory partition;
[0020] The verifying the validity of the target memory partition according to the attribute information of the target memory partition includes:
[0021] Acquire partition configuration information in the target object, wherein the partition configuration information includes identification information of an activated memory partition;
[0022] Determine a partition identification set of an activated memory partition from the partition configuration information in the target object;
[0023] If the partition identifier of the target memory partition belongs to the partition identifier set, it is determined that the target memory partition is valid.
[0024] Wherein, the relationship indication information includes identification information of each device in the at least two devices;
[0025] If the target memory partition is valid, backing up the target memory partition to obtain a backup memory partition, and deleting the target memory partition to release the access relationship between the at least two devices, including:
[0026] If the target memory partition is valid, obtaining a partition identifier of the target memory partition;
[0027] Generate the backup memory partition according to the partition identifier of the target memory partition and the identification information of each device in the at least two devices;
[0028] And the target memory partition is deleted to release the access relationship between at least two devices.
[0029] If a request for restoring the access relationship between the at least two devices is received, the target memory partition is restored according to the backup memory partition to restore the access relationship between the at least two devices, including:
[0030] If a request for restoring the access relationship between the at least two devices is received, determining the partition identifier of the target memory partition and identification information of each device in the at least two devices from the backup memory partition according to the request;
[0031] The target memory partition is restored according to the partition identifier of the target memory partition and the identification information of each device in the at least two devices, so as to restore the access relationship between the at least two devices.
[0032] Wherein, after deleting the target memory partition, the method further includes:
[0033] Adding the partition identifier of the target memory partition to the deleted memory partition list;
[0034] Compare the partition identifiers in the deleted memory partition list with the partition identifiers in the backup memory partition;
[0035] If the partition identifier in the backup memory partition does not belong to the deleted memory partition list, adding deletion indication information reflecting that the target memory partition is mistakenly deleted to the deleted memory partition list;
[0036] If the partition identifier in the backup memory partition belongs to the deleted memory partition list, deletion indication information is added to the deleted memory partition list to reflect that the target memory partition is not mistakenly deleted.
[0037] An embodiment of the present application provides a memory processing device, including:
[0038] an acquisition module, used to acquire a target memory partition to be deleted in a target object, and to acquire attribute information of the target memory partition; the target memory partition includes relationship indication information of at least two devices connected to the target object, the relationship indication information is used to indicate that there is an access relationship between the at least two devices, and the attribute information of the target memory partition is used to reflect at least one of the deletion permission of the target memory partition and the partition identifier of the target memory partition;
[0039] A verification module, used to verify the validity of the target memory partition according to the attribute information of the target memory partition;
[0040] a deletion module, configured to, if the target memory partition is valid, perform a backup process on the target memory partition to obtain a backup memory partition, and perform a deletion process on the target memory partition to release the access relationship between the at least two devices;
[0041] The recovery module is used to recover the target memory partition according to the backup memory partition if a request for recovering the access relationship between the at least two devices is received, so as to recover the access relationship between the at least two devices.
[0042] Wherein, the attribute information is used to reflect the deletion permission of the target memory partition;
[0043] The above verification modules include:
[0044] A first acquisition unit, used to acquire a device identifier of a terminal device that requests to delete the target memory partition;
[0045] A verification unit, used to verify whether the terminal device has the deletion authority for the target memory partition according to the device identifier;
[0046] The first determining unit is used to determine that the target memory partition is valid if the terminal device has deletion authority for the target memory partition.
[0047] The verification unit is specifically used for:
[0048] Querying the occupation status of the change lock of the target memory partition; the change lock is used to lock the change operation on the target memory partition;
[0049] If the occupation state of the change lock of the target memory partition is in an occupied state, obtaining a device identifier of an occupying terminal that occupies the change lock;
[0050] If the device identification of the terminal device is the same as the device identification of the occupying terminal, it is determined that the terminal device has the deletion authority for the target memory partition.
[0051] Wherein, the attribute information is used to reflect the partition identifier of the target memory partition;
[0052] The above verification module also includes:
[0053] A second acquisition unit, configured to acquire partition configuration information in the target object, wherein the partition configuration information includes identification information of an activated memory partition;
[0054] A second determining unit, configured to determine a partition identification set of an activated memory partition from the partition configuration information in the target object;
[0055] The third determining unit is used to determine that the target memory partition is valid if the partition identifier of the target memory partition belongs to the partition identifier set.
[0056] Wherein, the relationship indication information includes identification information of each device in the at least two devices;
[0057] The above deletion modules include:
[0058] a third acquiring unit, configured to acquire a partition identifier of the target memory partition if the target memory partition is valid;
[0059] A generating unit, configured to generate the backup memory partition according to the partition identifier of the target memory partition and the identification information of each device in the at least two devices;
[0060] The deleting unit is used to delete the target memory partition to release the access relationship between the at least two devices.
[0061] The above recovery module includes:
[0062] a fourth determining unit, configured to determine, if a request for restoring the access relationship between the at least two devices is received, a partition identifier of the target memory partition and identification information of each device in the at least two devices from the backup memory partition according to the request;
[0063] A recovery unit is used to perform recovery processing on the target memory partition according to the partition identifier of the target memory partition and the identification information of each device in the at least two devices, so as to restore the access relationship between the at least two devices.
[0064] Wherein, the device further comprises:
[0065] A first adding module, used for adding the partition identifier of the target memory partition to the deleted memory partition list;
[0066] A comparison processing module, used for comparing the partition identifiers in the deleted memory partition list with the partition identifiers in the backup memory partition;
[0067] A second adding module is used for adding deletion indication information reflecting that the target memory partition is mistakenly deleted in the deleted memory partition list if the partition identifier in the backup memory partition does not belong to the deleted memory partition list;
[0068] The third adding module is used to add deletion indication information reflecting that the target memory partition is not mistakenly deleted in the deleted memory partition list if the partition identifier in the backup memory partition belongs to the deleted memory partition list.
[0069] On one hand, the present application provides a computer device, including: a processor and a memory;
[0070] The memory is used to store a computer program, and the processor is used to call the computer program to perform the following steps:
[0071] Acquire a target memory partition to be deleted in a target object, and acquire attribute information of the target memory partition; the target memory partition includes relationship indication information of at least two devices connected to the target object, the relationship indication information is used to indicate that there is an access relationship between the at least two devices, and the attribute information of the target memory partition is used to reflect at least one of the deletion permission of the target memory partition and the partition identifier of the target memory partition;
[0072] Verifying the validity of the target memory partition according to the attribute information of the target memory partition;
[0073] If the target memory partition is valid, backing up the target memory partition to obtain a backup memory partition, and deleting the target memory partition to release the access relationship between the at least two devices;
[0074] If a request for restoring the access relationship between the at least two devices is received, the target memory partition is restored according to the backup memory partition to restore the access relationship between the at least two devices.
[0075] In one aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the following steps are performed:
[0076] Acquire a target memory partition to be deleted in a target object, and acquire attribute information of the target memory partition; the target memory partition includes relationship indication information of at least two devices connected to the target object, the relationship indication information is used to indicate that there is an access relationship between the at least two devices, and the attribute information of the target memory partition is used to reflect at least one of the deletion permission of the target memory partition and the partition identifier of the target memory partition;
[0077] Verifying the validity of the target memory partition according to the attribute information of the target memory partition;
[0078] If the target memory partition is valid, backing up the target memory partition to obtain a backup memory partition, and deleting the target memory partition to release the access relationship between the at least two devices;
[0079] If a request for restoring the access relationship between the at least two devices is received, the target memory partition is restored according to the backup memory partition to restore the access relationship between the at least two devices.
[0080] In an embodiment of the present application, by obtaining the target memory partition to be deleted in the target object, and obtaining the attribute information of the target memory partition, the validity of the target memory partition is verified according to the attribute information of the target memory partition. If the target memory partition is valid, the target memory partition is backed up, the backup memory partition is obtained, and the target memory partition is deleted to release the access relationship between at least two devices. By verifying the validity of the target memory partition, the validity refers to whether the target memory partition can be deleted. The target memory partition is deleted only when the target memory partition is valid, so that the accuracy of the target memory partition deletion can be improved and the occurrence of accidental deletion can be reduced. If a request for restoring the access relationship between at least two devices is received, the target memory partition is restored according to the backup memory partition to restore the access relationship between at least two devices. The target memory partition is restored by the backup memory partition without manual backup and restoration, and the situation that the target memory partition cannot be restored due to manual forgetting of backup is also avoided, thereby improving the accuracy of the target memory partition recovery and improving the work efficiency of the target memory partition deletion and restoration. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0082] Figure 1 It is a flowchart of a memory processing method provided in an embodiment of the present application;
[0083] Figure 2 It is a schematic diagram of a method for verifying whether a terminal device has deletion authority for a target memory partition provided by an embodiment of the present application;
[0084] Figure 3 It is a flowchart of another memory processing method provided in an embodiment of the present application;
[0085] Figure 4 It is a schematic diagram of a method for recovering a target memory partition provided in an embodiment of the present application;
[0086] Figure 5 is a schematic diagram of a rollback script provided in an embodiment of the present application;
[0087] Figure 6 is a schematic diagram of another memory processing device provided in an embodiment of the present application;
[0088] Figure 7 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0089] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0090] See also Figure 1 , is a flowchart of a memory processing method provided in an embodiment of the present application. The method can be executed by a computer device, which may refer to a terminal or a server. The terminal may include but is not limited to: smart phones, tablet computers, laptops, desktop computers, smart speakers, smart watches, etc.; the server may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms. Figure 1 As shown, the memory processing method may include steps S101-S105.
[0091] S101, obtaining a target memory partition to be deleted in a target object, and obtaining attribute information of the target memory partition.
[0092] A target memory partition to be deleted in a target object is obtained, and attribute information of the target memory partition is obtained, wherein the target memory partition includes relationship indication information of at least two devices accessing the target object, and the relationship indication information is used to indicate that there is an access relationship between at least two devices. The attribute information of the target memory partition is used to reflect at least one of the deletion authority of the target memory partition and the partition identifier of the target memory partition. The target memory partition may refer to a memory partition (zone) of a SAN switch, and the memory partition (zone) function of the SAN switch is similar to the VLAN (Virtual Local Area Network) function on an Ethernet switch, which logically divides the devices connected in the SAN network into different memory partitions (zones), realizes direct access between devices in the same memory partition (zone), and isolates devices that are not divided into the same memory partition (zone) from each other. Storage Area Network (SAN) is widely used in data centers to solve the growing data storage and management problems by combining hardware storage technology and network technology.
[0093] S102: Verify the validity of the target memory partition according to the attribute information of the target memory partition.
[0094] Before deleting the target memory partition, the validity of the target memory partition can be verified based on the attribute information of the target memory partition. The validity of the target memory partition refers to whether the target memory partition can be deleted. If the target memory partition is not valid, the target memory partition cannot be deleted; if the target memory partition is valid, the target memory partition can be deleted. The attribute information of the target memory partition is used to reflect at least one of the deletion authority of the target memory partition, the partition identification of the target memory partition, and the authenticity of the target memory partition. The validity of the target memory partition can be verified based on at least one of the attribute information reflecting the deletion authority of the target memory partition, the partition identification of the target memory partition, and the authenticity of the target memory partition.
[0095] Optionally, the attribute information of the target memory partition is used to reflect the deletion permission of the target memory partition. When verifying the validity of the target memory partition based on the attribute information of the target memory partition, the device identification of the terminal device requesting to delete the target memory partition can be obtained, and the terminal device is verified based on the device identification to see whether it has the deletion permission for the target memory partition. If the terminal device has the deletion permission for the target memory partition, it is determined that the target memory partition is valid.
[0096] The device identification of the terminal device currently requesting to delete the target memory partition can be obtained, and the device identification of the terminal device includes at least one of the task identification corresponding to the task currently running in the terminal device, the account of the user corresponding to the terminal device, the IP address of the terminal device, and the MAC address of the terminal device. The currently running task refers to the task currently requesting to delete the target memory partition in the terminal device. According to the device identification of the terminal device, it is verified whether the terminal device has the deletion permission for the target memory partition. Only when the terminal device has the deletion permission for the target memory partition can the target memory partition be deleted. Therefore, if the terminal device has the deletion permission for the target memory partition, it is determined that the target memory partition is valid, and the target memory partition can be deleted; if the terminal device does not have the deletion permission for the target memory partition, the target memory partition is not valid and cannot be deleted. This facilitates the management of the deletion operation of the target memory partition and avoids confusion caused by multiple devices performing deletion operations on the target memory partition.
[0097] like Figure 2 As shown, it is a schematic diagram of a method for verifying whether a terminal device has deletion authority for a target memory partition provided by an embodiment of the present application, such as Figure 2 As shown, the method for verifying whether a terminal device has deletion authority for a target memory partition includes steps S21-S23.
[0098] S21, querying the occupancy status of the change lock of the target memory partition, where the change lock is used to lock the change operation on the target memory partition.
[0099] You can query the possession status of the change lock of the target memory partition. The change lock is used to control that only one memory partition task can be performed at a time. The change lock is used to lock the change operation on the target memory partition. The memory partition can be changed or deleted only when the change lock is occupied. That is, only one terminal or multiple specified terminals can perform change operations on the target memory partition at the same time, which facilitates the management of memory partition deletion operations.
[0100] S22: If the occupation state of the change lock of the target memory partition is in the occupied state, obtain the device identifier of the occupying terminal that occupies the change lock.
[0101] S23, if the device identification of the terminal device is the same as the device identification of the occupying terminal, it is determined that the terminal device has the deletion authority for the target memory partition.
[0102] If the possession state of the change lock is in the occupied state, the device identification of the occupying terminal that occupies the change lock is determined. If the terminal device requesting to delete the target memory partition is the same as the device identification of the occupying terminal that occupies the change lock, it means that the terminal device requesting to delete the target memory partition occupies the change lock of the target memory partition, and the target memory partition can be deleted, so it can be determined that the terminal device has the deletion permission for the target memory partition. If the possession state of the change lock is in the unoccupied state, it means that no terminal device has submitted a task to delete the memory partition at present, so the terminal device requesting to delete the target memory partition can be set to occupy the change lock so that the terminal device has the deletion permission to delete the target memory partition. Among them, when querying the possession state of the change lock, the state value of the change lock can be checked. If the state value of the change lock is 0, that is, it is in the unoccupied state, it means that the memory change lock is not occupied, and no terminal has submitted a task to delete the memory partition at present. Then the state value of the change lock can be set to the identification information of the terminal device requesting to delete the target memory partition, that is, the ID of the terminal device, which means that the terminal device occupies the change lock and can delete the target memory partition. If the status value of the change lock is not 0, it means that the memory partition change lock is occupied by other terminal devices. Then the status value of the change lock can be repeatedly confirmed until the status value of the change lock is 0. Then the status value of the change lock can be set to the terminal device that requests to delete the target memory partition. At the same time, if the right to use the change lock is not obtained within the preset time threshold (such as 60 seconds), the information of failure to obtain the right to use the change lock can be returned and exit (that is, no longer continue to query the possession status of the change lock and no longer try to occupy the change lock in this task), prompting the user that the target memory partition cannot be deleted at present.
[0103] Optionally, the attribute information is used to reflect the partition identifier of the target memory partition. When verifying the validity of the target memory partition according to the attribute information of the target memory partition, the partition configuration information in the target object can be obtained, and the partition configuration information includes the identifier information of the memory partition in the activated state. The partition identifier set of the memory partition in the activated state is determined from the partition configuration information in the target object. If the partition identifier of the target memory partition belongs to the partition identifier set, it is determined that the target memory partition is valid.
[0104] When determining the validity of the target memory partition, the partition configuration information in the target object can be obtained, and the partition configuration information includes the identification information of the memory partition in the activated state. After establishing a memory partition, it is necessary to add the memory partition to the partition configuration, and activate the memory partition before the memory partition is valid. Therefore, the partition identification set of the memory partition in the activated state can be determined from the partition configuration information. Determine whether there is a partition identification in the partition identification set that matches the partition identification of the target memory partition. If there is a partition identification in the partition identification set that matches the partition identification of the target memory partition, that is, the partition identification of the target memory partition belongs to the partition identification set, then it is determined that the target memory partition is valid.
[0105] Optionally, the attribute information is used to reflect the partition identifier of the target memory partition. When determining the validity of the target memory partition based on the attribute information of the target memory partition, it is possible to determine whether the target memory partition exists from the memory network based on the partition identifier of the target memory partition, that is, to verify the authenticity of the target memory partition. The memory network stores the partition identifier of the established memory partition. If the target memory partition exists in the memory network, the target memory partition is valid; if the target memory partition does not exist in the memory network, the target memory partition is not valid.
[0106] Optionally, it is possible to determine whether the partition identifier of the target memory partition exists in multiple memory networks (fabrics) based on the partition identifier of the target memory partition. When establishing memory partitions, memory partitions with the same partition identifier can be established in different partition networks, such as a memory partition with a partition identifier of 1 can be established in memory network 1, and a memory partition with a partition identifier of 1 can also be established in another memory network 2. The establishment of memory partitions with the same partition identifier in different memory networks is not affected. However, memory partitions with the same partition identifier cannot be established in the same memory network, such as two memory partitions with partition identifiers of 1 cannot be established in memory network 1. If the partition identifier of the target memory partition exists in multiple memory networks, it is necessary to determine the target memory network to which the target memory partition belongs, and the target memory partition can be deleted in the target memory network. If the target memory partition identifier exists in memory network 1 and in memory network 3, when deleting the target memory partition, if it is not certain which memory network the target memory partition belongs to, the memory partitions in the two memory networks may be deleted, or the target memory partition in one memory network may be randomly selected for deletion. For example, if the target memory partition in memory network 3 is deleted, if the target memory partition that the user wants to delete is a memory partition in memory network 1, there will be a problem of mistaken deletion or the target memory partition cannot be deleted effectively. Therefore, when it is found that the partition identifier of the target memory partition exists in multiple memory networks, the target memory network to which the target memory partition specifically belongs can be determined, and then the target memory partition can be deleted from the target memory network, thereby avoiding the phenomenon of mistaken deletion and effectively deleting the target memory partition.
[0107] S103: If the target memory partition is valid, back up the target memory partition to obtain a backup memory partition, and delete the target memory partition to release the access relationship between at least two devices.
[0108] If the target memory partition is valid, it means that the target memory partition can be deleted, and the target memory partition is backed up to obtain a backup memory partition. After the target memory partition is backed up, the target memory partition is deleted to release the access relationship between at least two devices. When a task to delete the target memory partition is received, the target memory partition is automatically backed up without the user having to perform manual backup operations, thereby avoiding the problem of backup errors during manual backup and effectively improving the efficiency of deleting and backing up the target memory partition.
[0109] Optionally, the relationship indication information includes identification information of each device in at least two devices, and if the target memory partition is valid, the target memory partition is backed up to obtain the backup memory partition, and the target memory partition is deleted to release the access relationship between the at least two devices. If the target memory partition is valid, the partition identification of the target memory partition is obtained. A backup memory partition is generated according to the partition identification of the target memory partition and the identification information of each device in at least two devices, and the target memory partition is deleted to release the access relationship between the at least two devices.
[0110] The target memory partition includes relationship indication information of at least two devices connected to the target object, and the relationship indication information includes identification information of each device in the at least two devices. If the target memory partition is valid, the identification information of the target memory partition and the identification information of each device in the at least two devices in the target memory partition are obtained. A backup memory partition is generated based on the identification information of the target memory partition and the identification information of each device in the at least two devices in the target memory partition, such as generating a backup partition file based on the identification information of the target memory partition and the identification information of each device in the at least two devices in the target memory partition. The backup partition file stores the target memory network (fabric) to which the target memory partition belongs, and the target partition configuration to which the target memory partition belongs. After the target memory partition is deleted, when it is necessary to restore the target memory partition, the target memory partition can be restored based on the backup partition file (i.e., the backup memory partition).
[0111] Among them, when the backup process of the target memory partition fails, a prompt message is returned to prompt the user that the backup of the target memory partition has failed, and the task of deleting the target memory partition is terminated. At the same time, the terminal device's possession of the change lock is released, that is, the status value of the change lock is set to 0. When the backup of the target memory partition is successful, the action of deleting the target memory partition is immediately executed to ensure that the time difference between the completion time of the target memory partition backup and the initiation time of the target memory partition deletion is very short, so that the user can restore the target memory partition to be restored according to the backup time of each backup memory partition. If the user wants to restore the target memory partition deleted within a certain period of time, if too many are deleted and it is complicated to search based on the identification information, you can directly select the target memory partition deleted within a period of time for restoration.
[0112] S104: If a request for restoring the access relationship between at least two devices is received, the target memory partition is restored according to the backup memory partition to restore the access relationship between the at least two devices.
[0113] If a request for restoring the access relationship between at least two devices is received, the target memory partition is restored according to the backup memory partition to restore the access relationship between at least two devices. If no request for restoring the access relationship between at least two devices is received, the target memory partition is not restored.
[0114] Optionally, if a request for restoring the access relationship between at least two devices is received, the partition identifier of the target memory partition and the identification information of each device in the at least two devices are determined from the backup memory partition according to the request. The target memory partition is restored according to the partition identifier of the target memory partition and the identification information of each device in the at least two devices to restore the access relationship between the at least two devices. When restoring the target memory partition, a target memory partition can be established in a target memory network corresponding to the target memory partition, and the target memory partition is added to the target memory configuration, and the target memory partition is activated, so that the target memory partition is restored. After the backup memory partition of the target memory partition is generated, the target memory partition is deleted to release the access relationship between the at least two devices in the target memory partition. If at least two devices in the target memory partition can access each other before the target memory partition is deleted, the at least two devices cannot access each other after the target memory partition is deleted. In this way, the target memory partition can be automatically backed up and restored when it is needed. The user does not need to log in to the SAN switch to perform the above operations manually, which improves work efficiency. When there are many deleted memory partitions, the efficiency advantage is more obvious. At the same time, it also avoids the situation where the user forgets to back up the target memory partition and cannot restore the target memory partition when restoring the target memory partition urgently.
[0115] In an embodiment of the present application, by obtaining the target memory partition to be deleted in the target object and obtaining the attribute information of the target memory partition, the validity of the target memory partition is verified according to the attribute information of the target memory partition. If the target memory partition is valid, the target memory partition is backed up, the backup memory partition is obtained, and the target memory partition is deleted to release the access relationship between at least two devices. The validity of the target memory partition is verified by whether the terminal device has the deletion authority for the target memory partition and whether the target memory partition is in an activated state, and the validity refers to whether the target memory partition can be deleted. The target memory partition is deleted only when the target memory partition is valid, so that the accuracy of the target memory partition deletion can be improved and the situation of accidental deletion can be reduced. If a request for restoring the access relationship between at least two devices is received, the target memory partition is restored according to the backup memory partition to restore the access relationship between at least two devices. The target memory partition is restored by the backup memory partition without manual backup and restoration, and the situation that the target memory partition cannot be restored due to manual forgetting of backup is also avoided, thereby improving the accuracy of the target memory partition recovery and improving the work efficiency of the target memory partition deletion and restoration.
[0116] See also Figure 3 , is a flow chart of another memory processing method provided by an embodiment of the present application. The method can be executed by a computer device, such as Figure 3 As shown, the other memory processing method may include steps S201-S208.
[0117] S201, obtaining a target memory partition to be deleted in a target object, and obtaining attribute information of the target memory partition.
[0118] S202: Verify the validity of the target memory partition according to the attribute information of the target memory partition.
[0119] S203: If the target memory partition is valid, back up the target memory partition to obtain a backup memory partition, and delete the target memory partition to release the access relationship between at least two devices.
[0120] The specific contents of steps S201-S203 in the embodiment of the present application can be found in Figure 1 The contents in the corresponding embodiments will not be repeated here in the embodiments of this application.
[0121] S204: Add the partition identifier of the target memory partition to the deleted memory partition list.
[0122] S205: Compare the partition identifier in the deleted memory partition list with the partition identifier in the backup memory partition.
[0123] After deleting the target memory partition, the partition identifier of the memory partition actually deleted is added to a deleted memory partition list, which also stores at least two devices in the target memory partition actually deleted. The partition identifier in the deleted memory partition list is compared with the partition identifier in the backup memory partition to determine whether the partition identifiers of the memory partition actually deleted in the deleted memory partition list are the same as those in the backup memory partition.
[0124] S206: If the partition identifier in the backup memory partition does not belong to the deleted memory partition list, then add deletion indication information reflecting that the target memory partition is mistakenly deleted to the deleted memory partition list.
[0125] S207: If the partition identifier in the backup memory partition belongs to the deleted memory partition list, then add deletion indication information in the deleted memory partition list to reflect that the target memory partition is not mistakenly deleted.
[0126] If the partition identifier in the backup memory partition does not belong to the deleted memory partition list, it means that the corresponding memory partition in the deleted memory partition list is not the target memory partition, but other memory partitions are deleted by mistake, and deletion indication information reflecting that the target memory partition is deleted by mistake is added to the deleted memory partition list. For example, if the partition identifier 1 in the backup memory partition does not belong to the deleted memory partition list, it means that when the target memory partition is deleted, the target memory partition with the partition identifier 1 is not deleted, but other memory partitions are deleted, or the deletion processing of the target memory partition with the partition identifier 1 is omitted. If the partition identifier in the backup memory partition belongs to the deleted memory partition list, it means that the target memory partition is deleted during the actual deletion. For example, if the partition identifier 2 in the backup memory partition belongs to the deleted memory partition list, it means that the target memory partition with the partition identifier 2 is deleted during the actual deletion, and deletion indication information reflecting that the target memory partition is not deleted by mistake is added to the deleted memory partition list. By adding deletion indication information to the deleted memory partition list, the actually deleted memory partition can be verified to verify whether there is any accidental deletion.
[0127] Among them, the deleted target memory partition can be compared with the backup memory partition according to the backup memory partition and the deleted memory partition list to determine whether they are the same in quantity and content. If they are different, there is an error deletion. The backup memory partition includes the target memory partition that should be deleted, and the deleted memory partition list includes the memory partition that has actually been deleted. And add deletion indication information to the corresponding memory partition so that the user can determine whether the memory partition needs to be restored according to the deletion indication information.
[0128] For example, the target memory partition is zone. The system background can obtain the target memory partition that has been deleted in this task, and save the target memory partition that has been deleted in this task as a deletion file (that is, a deleted memory partition list). The deletion file name format is "zone_cfg_ <jobid>.tmp", where jobid is the ID of the task that the current terminal device requests to delete the target memory partition. By comparing "zone_cfg_ <jobid>.bak (i.e. backup memory partition)" file and "zone_cfg_ <jobid>.tmp (i.e., deleted memory partition list)". The backup memory partition includes the target memory partition that should be deleted, while the deleted memory partition list includes the actually deleted memory partition. By comparing the "actually deleted zone entries" and the "zone entries that should be deleted" one by one, it can be determined whether the two are completely matched. If they do not match, an alarm prompt is given, and all deleted zone entries in the task of the current terminal device requesting to delete the target memory partition are distinguished according to the "zone indication information that should be deleted" and the "zone indication information that was mistakenly deleted".
[0129] At the same time, after deleting the target memory partition, the right to use the change lock is released, that is, the state value of the change lock is set to 0. Figure 4 As shown, it is a schematic diagram of a method for recovering a target memory partition provided by an embodiment of the present application, such as Figure 4 As shown in the figure, after deleting the target memory partition, regardless of whether there is a mistaken deletion of a memory partition in this memory partition deletion task, the system will list all the target memory partitions that have actually been deleted in this task, and each deleted target memory partition will add corresponding deletion indication information according to the actual situation, such as "should be deleted" or "deleted by mistake". Users can know which target memory partitions are correctly deleted, which target memory partitions are mistakenly deleted, and which target memory partitions are omitted and not deleted according to the deletion indication information of each deleted target memory partition in the deleted memory partition list, and select the target memory partitions that need to be restored. Figure 4 As shown, the user can select the target memory partition to be restored in the corresponding selection window according to the deletion indication information of each deleted target memory partition in the deleted memory partition list.
[0130] S208: If a request for restoring the access relationship between at least two devices is received, the target memory partition is restored according to the backup memory partition to restore the access relationship between the at least two devices.
[0131] If a request for restoring the access relationship between at least two devices is received, the target memory partition is restored according to the backup memory partition to restore the access relationship between at least two devices. If no request for restoring the access relationship between at least two devices is received, the target memory partition is not restored.
[0132] After the user has selected the target memory partition to be restored, a rollback script corresponding to the target memory partition to be restored can be generated, and the target memory partition to be restored can be restored according to the rollback script. If the target memory partition to be restored is deleted correctly, a corresponding rollback script can be generated according to the backup memory partition. If the target memory partition to be restored is deleted incorrectly, a corresponding rollback script can be generated according to the deleted memory partition list or the backup memory partition. When the target memory partition to be restored is received, a rollback script corresponding to the target memory partition to be restored is generated, that is, the target memory network to which the target memory partition to be restored belongs, the target partition configuration to which the target memory partition to be restored belongs, and at least two devices in the target memory partition to be restored are determined. According to the rollback script, the target memory partition to be restored can be restored, that is, at least two corresponding devices are added to the target memory partition to be restored, and the target memory partition to be restored is re-established in the target memory network. Finally, the target memory partition is added to the target partition configuration, and the target memory partition is activated, so that the target memory partition is restored, that is, the access relationship between at least two devices in the target memory partition to be restored is restored.
[0133] like Figure 5 As shown, it is a schematic diagram of a rollback script provided in an embodiment of the present application, such as Figure 5 As shown, when it is necessary to recover the target memory partition 2, the target memory partition 3 and the target memory partition 4, the target memory network and the target partition configuration to which each target memory partition in the target memory partition 2, the target memory partition 3 and the target memory partition 4 belongs are determined, such as the target memory partition 3 and the target memory partition 4 belong to the memory network 1 and the partition configuration 1, and the target memory partition 2 belongs to the memory network 2 and the partition configuration 2. And at least two devices in the target memory partitions corresponding to the target memory partition 2, the target memory partition 3 and the target memory partition 4, respectively. And the recovery is performed according to the corresponding target memory network, the target partition configuration and the at least two devices. For example, when recovering the target memory partition 2, the target memory partition 2 is established in the memory network according to the at least two devices corresponding to the target memory partition 2, and the established target memory partition 2 is added to the partition configuration 2, and the target memory partition 2 is activated, and the recovery of the target memory partition 2 is completed.
[0134] In an embodiment of the present application, by obtaining the target memory partition to be deleted in the target object and obtaining the attribute information of the target memory partition, the validity of the target memory partition is verified according to the attribute information of the target memory partition. If the target memory partition is valid, the target memory partition is backed up, the backup memory partition is obtained, and the target memory partition is deleted to release the access relationship between at least two devices. The validity of the target memory partition is verified by whether the terminal device has the deletion authority for the target memory partition and whether the target memory partition is in an activated state, and the validity refers to whether the target memory partition can be deleted. The target memory partition is deleted only when the target memory partition is valid, so that the accuracy of the target memory partition deletion can be improved and the occurrence of accidental deletion can be reduced. At the same time, the partition identifier in the actually deleted deletion memory partition list is compared with the partition identifier in the backup memory partition, and the deletion indication information corresponding to each memory partition in the deletion memory partition list is added. The user can determine the target memory partition that needs to be restored according to the deletion indication information, so that the user can clearly know which target memory partitions are correctly deleted and which target memory partitions are mistakenly deleted. If a request for restoring the access relationship between at least two devices is received, the target memory partition is restored according to the backup memory partition to restore the access relationship between at least two devices. The target memory partition is restored by the backup memory partition without manual backup and restoration, and the situation that the target memory partition cannot be restored due to manual forgetting of backup is also avoided, thereby improving the accuracy of target memory partition restoration and improving the work efficiency of target memory partition deletion and restoration.
[0135] See also Figure 6 , is a schematic diagram of the structure of a memory processing device provided in an embodiment of the present application. The memory processing device may be a computer program (including program code) running in a computer device, for example, the memory processing device is an application software; the device may be used to execute the corresponding steps in the memory processing method provided in an embodiment of the present application. Figure 6 As shown, the memory processing may include: an acquisition module 11, a verification module 12, a deletion module 13, and a recovery module 14.
[0136] An acquisition module 11 is used to acquire a target memory partition to be deleted in a target object, and to acquire attribute information of the target memory partition; the target memory partition includes relationship indication information of at least two devices connected to the target object, and the relationship indication information is used to indicate that there is an access relationship between the at least two devices, and the attribute information of the target memory partition is used to reflect at least one of the deletion permission of the target memory partition and the partition identifier of the target memory partition.
[0137] The verification module 12 is used to verify the validity of the target memory partition according to the attribute information of the target memory partition.
[0138] The deleting module 13 is used to back up the target memory partition if the target memory partition is valid, obtain a backup memory partition, and delete the target memory partition to release the access relationship between the at least two devices.
[0139] The recovery module 14 is used to recover the target memory partition according to the backup memory partition to recover the access relationship between the at least two devices if a request for recovering the access relationship between the at least two devices is received.
[0140] Wherein, the attribute information is used to reflect the deletion permission of the target memory partition;
[0141] The verification module 12 includes:
[0142] A first acquisition unit, used to acquire a device identifier of a terminal device that requests to delete the target memory partition;
[0143] A verification unit, used to verify whether the terminal device has the deletion authority for the target memory partition according to the device identifier;
[0144] The first determining unit is used to determine that the target memory partition is valid if the terminal device has deletion authority for the target memory partition.
[0145] The verification unit is specifically used for:
[0146] Querying the occupation status of the change lock of the target memory partition; the change lock is used to lock the change operation on the target memory partition;
[0147] If the occupation state of the change lock of the target memory partition is in an occupied state, obtaining a device identifier of an occupying terminal that occupies the change lock;
[0148] If the device identification of the terminal device is the same as the device identification of the occupying terminal, it is determined that the terminal device has the deletion authority for the target memory partition.
[0149] Wherein, the attribute information is used to reflect the partition identifier of the target memory partition;
[0150] The verification module 12 further includes:
[0151] A second acquisition unit, configured to acquire partition configuration information in the target object, wherein the partition configuration information includes identification information of an activated memory partition;
[0152] A second determining unit, configured to determine a partition identification set of an activated memory partition from the partition configuration information in the target object;
[0153] The third determining unit is used to determine that the target memory partition is valid if the partition identifier of the target memory partition belongs to the partition identifier set.
[0154] Wherein, the relationship indication information includes identification information of each device in the at least two devices;
[0155] The above-mentioned deletion module 13 comprises:
[0156] a third acquiring unit, configured to acquire a partition identifier of the target memory partition if the target memory partition is valid;
[0157] A generating unit, configured to generate the backup memory partition according to the partition identifier of the target memory partition and the identification information of each device in the at least two devices;
[0158] The deleting unit is used to delete the target memory partition to release the access relationship between the at least two devices.
[0159] The above-mentioned recovery module 14 comprises:
[0160] a fourth determining unit, configured to determine, if a request for restoring the access relationship between the at least two devices is received, a partition identifier of the target memory partition and identification information of each device in the at least two devices from the backup memory partition according to the request;
[0161] A recovery unit is used to perform recovery processing on the target memory partition according to the partition identifier of the target memory partition and the identification information of each device in the at least two devices, so as to restore the access relationship between the at least two devices.
[0162] Wherein, the device further comprises:
[0163] A first adding module, used for adding the partition identifier of the target memory partition to the deleted memory partition list;
[0164] A comparison processing module, used for comparing the partition identifiers in the deleted memory partition list with the partition identifiers in the backup memory partition;
[0165] A second adding module is used for adding deletion indication information reflecting that the target memory partition is mistakenly deleted in the deleted memory partition list if the partition identifier in the backup memory partition does not belong to the deleted memory partition list;
[0166] The third adding module is used to add deletion indication information reflecting that the target memory partition is not mistakenly deleted in the deleted memory partition list if the partition identifier in the backup memory partition belongs to the deleted memory partition list.
[0167] In an embodiment of the present application, by obtaining the target memory partition to be deleted in the target object and obtaining the attribute information of the target memory partition, the validity of the target memory partition is verified according to the attribute information of the target memory partition. If the target memory partition is valid, the target memory partition is backed up, the backup memory partition is obtained, and the target memory partition is deleted to release the access relationship between at least two devices. The validity of the target memory partition is verified by whether the terminal device has the deletion authority for the target memory partition and whether the target memory partition is in an activated state, and the validity refers to whether the target memory partition can be deleted. The target memory partition is deleted only when the target memory partition is valid, so that the accuracy of the target memory partition deletion can be improved and the occurrence of accidental deletion can be reduced. At the same time, the partition identifier in the actually deleted deletion memory partition list is compared with the partition identifier in the backup memory partition, and the deletion indication information corresponding to each memory partition in the deletion memory partition list is added. The user can determine the target memory partition that needs to be restored according to the deletion indication information, so that the user can clearly know which target memory partitions are correctly deleted and which target memory partitions are mistakenly deleted. If a request for restoring the access relationship between at least two devices is received, the target memory partition is restored according to the backup memory partition to restore the access relationship between at least two devices. The target memory partition is restored by the backup memory partition without manual backup and restoration, and the situation that the target memory partition cannot be restored due to manual forgetting of backup is also avoided, thereby improving the accuracy of target memory partition restoration and improving the work efficiency of target memory partition deletion and restoration.
[0168] See also Figure 7 , is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. Figure 7 As shown, the above-mentioned computer device 1000 may include: a processor 1001, a network interface 1004 and a memory 1005. In addition, the above-mentioned computer device 1000 may also include: a user interface 1003, and at least one communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. Among them, the user interface 1003 may include a display screen (Display), a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or it may be a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 1005 may optionally also be at least one storage device located away from the aforementioned processor 1001. As Figure 7 As shown, the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a device control application program.
[0169] exist Figure 7 In the computer device 1000 shown, the network interface 1004 can provide a network communication function; the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to call the device control application stored in the memory 1005 to achieve:
[0170] Optionally, the processor 1001 may be configured to call a device control application stored in the memory 1005 to implement:
[0171] Acquire a target memory partition to be deleted in a target object, and acquire attribute information of the target memory partition; the target memory partition includes relationship indication information of at least two devices connected to the target object, the relationship indication information is used to indicate that there is an access relationship between the at least two devices, and the attribute information of the target memory partition is used to reflect at least one of the deletion permission of the target memory partition and the partition identifier of the target memory partition;
[0172] Verifying the validity of the target memory partition according to the attribute information of the target memory partition;
[0173] If the target memory partition is valid, backing up the target memory partition to obtain a backup memory partition, and deleting the target memory partition to release the access relationship between the at least two devices;
[0174] If a request for restoring the access relationship between the at least two devices is received, the target memory partition is restored according to the backup memory partition to restore the access relationship between the at least two devices.
[0175] Optionally, the processor 1001 may be configured to call a device control application stored in the memory 1005 to implement:
[0176] Obtaining a device identifier of a terminal device that requests to delete the target memory partition;
[0177] Verifying, based on the device identifier, whether the terminal device has deletion authority for the target memory partition;
[0178] If the terminal device has deletion authority for the target memory partition, it is determined that the target memory partition is valid.
[0179] Optionally, the processor 1001 may be configured to call a device control application stored in the memory 1005 to implement:
[0180] Querying the occupation status of the change lock of the target memory partition; the change lock is used to lock the change operation on the target memory partition;
[0181] If the occupation state of the change lock of the target memory partition is in an occupied state, obtaining a device identifier of an occupying terminal that occupies the change lock;
[0182] If the device identification of the terminal device is the same as the device identification of the occupying terminal, it is determined that the terminal device has the deletion authority for the target memory partition.
[0183] Optionally, the processor 1001 may be configured to call a device control application stored in the memory 1005 to implement:
[0184] Acquire partition configuration information in the target object, wherein the partition configuration information includes identification information of an activated memory partition;
[0185] Determine a partition identification set of an activated memory partition from the partition configuration information in the target object;
[0186] If the partition identifier of the target memory partition belongs to the partition identifier set, it is determined that the target memory partition is valid.
[0187] Optionally, the processor 1001 may be configured to call a device control application stored in the memory 1005 to implement:
[0188] If the target memory partition is valid, obtaining a partition identifier of the target memory partition;
[0189] Generate the backup memory partition according to the partition identifier of the target memory partition and the identification information of each device in the at least two devices;
[0190] And the target memory partition is deleted to release the access relationship between the at least two devices.
[0191] Optionally, the processor 1001 may be configured to call a device control application stored in the memory 1005 to implement:
[0192] If a request for restoring the access relationship between the at least two devices is received, determining the partition identifier of the target memory partition and identification information of each device in the at least two devices from the backup memory partition according to the request;
[0193] The target memory partition is restored according to the partition identifier of the target memory partition and the identification information of each device in the at least two devices, so as to restore the access relationship between the at least two devices.
[0194] Optionally, the processor 1001 may be configured to call a device control application stored in the memory 1005 to implement:
[0195] Adding the partition identifier of the target memory partition to the deleted memory partition list;
[0196] Compare the partition identifiers in the deleted memory partition list with the partition identifiers in the backup memory partition;
[0197] If the partition identifier in the backup memory partition does not belong to the deleted memory partition list, adding deletion indication information reflecting that the target memory partition is mistakenly deleted to the deleted memory partition list;
[0198] If the partition identifier in the backup memory partition belongs to the deleted memory partition list, deletion indication information is added to the deleted memory partition list to reflect that the target memory partition is not mistakenly deleted.
[0199] In an embodiment of the present application, by obtaining the target memory partition to be deleted in the target object and obtaining the attribute information of the target memory partition, the validity of the target memory partition is verified according to the attribute information of the target memory partition. If the target memory partition is valid, the target memory partition is backed up, the backup memory partition is obtained, and the target memory partition is deleted to release the access relationship between at least two devices. The validity of the target memory partition is verified by whether the terminal device has the deletion authority for the target memory partition and whether the target memory partition is in an activated state, and the validity refers to whether the target memory partition can be deleted. The target memory partition is deleted only when the target memory partition is valid, so that the accuracy of the target memory partition deletion can be improved and the occurrence of accidental deletion can be reduced. At the same time, the partition identifier in the actually deleted deletion memory partition list is compared with the partition identifier in the backup memory partition, and the deletion indication information corresponding to each memory partition in the deletion memory partition list is added. The user can determine the target memory partition that needs to be restored according to the deletion indication information, so that the user can clearly know which target memory partitions are correctly deleted and which target memory partitions are mistakenly deleted. If a request for restoring the access relationship between at least two devices is received, the target memory partition is restored according to the backup memory partition to restore the access relationship between at least two devices. The target memory partition is restored by the backup memory partition without manual backup and restoration, and the situation that the target memory partition cannot be restored due to manual forgetting of backup is also avoided, thereby improving the accuracy of target memory partition restoration and improving the work efficiency of target memory partition deletion and restoration.
[0200] It should be understood that the computer device 1000 described in the embodiment of the present application can execute the above Figure 1 And the previous article Figure 3 The description of the above memory processing method in the corresponding embodiment can also be performed as described above. Figure 6 The description of the memory processing device in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated here.
[0201] In the embodiment of the present application, in addition, it should be pointed out here that: the embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program executed by the memory processing device mentioned above, and the computer program includes program instructions. When the processor executes the program instructions, it can execute the above-mentioned Figure 1 or Figure 3 The description of the above-mentioned memory processing method in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application.
[0202] As an example, the above program instructions may be deployed on a computer device for execution, or deployed on multiple computer devices located at one location for execution, or executed on multiple computer devices distributed at multiple locations and interconnected by a communication network. Multiple computer devices distributed at multiple locations and interconnected by a communication network may constitute a blockchain network.
[0203] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the above-mentioned program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The above-mentioned storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0204] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.< / jobid> < / jobid> < / jobid>
Claims
1. A memory processing method, It is characterized in that include: Obtaining a target memory partition to be deleted in a target object, and obtaining attribute information of the target memory partition; The target memory partition includes relationship indication information of at least two devices accessing the target object, the relationship indication information being used to indicate that there is an access relationship between the at least two devices; the relationship indication information includes identification information of each device in the at least two devices; When the attribute information is used to reflect the deletion authority of the target memory partition, obtaining a device identifier of a terminal device that requests to delete the target memory partition; Querying the occupancy status of the change lock of the target memory partition; The change lock is used to lock the change operation on the target memory partition; If the occupation state of the change lock of the target memory partition is in an occupied state, obtaining a device identifier of an occupying terminal that occupies the change lock; If the device identification of the terminal device is the same as the device identification of the occupying terminal, determining that the terminal device has the deletion authority for the target memory partition; If the terminal device has deletion authority for the target memory partition, determining that the target memory partition is valid; When the attribute information is used to reflect the partition identification of the target memory partition, obtaining the partition configuration information in the target object, wherein the partition configuration information includes identification information of the memory partition in an activated state; Determine a partition identification set of an activated memory partition from the partition configuration information in the target object; if the partition identification of the target memory partition belongs to the partition identification set, determine that the target memory partition is valid; If the target memory partition is valid, obtaining a partition identifier of the target memory partition; Generate a backup memory partition according to the partition identifier of the target memory partition and the identification information of each device in the at least two devices; and deleting the target memory partition to release the access relationship between the at least two devices; If a request for restoring the access relationship between the at least two devices is received, the target memory partition is restored according to the backup memory partition to restore the access relationship between the at least two devices.
2. The method according to claim 1, It is characterized in that If a request for restoring the access relationship between the at least two devices is received, the target memory partition is restored according to the backup memory partition to restore the access relationship between the at least two devices, including: If a request for restoring the access relationship between the at least two devices is received, determining the partition identifier of the target memory partition and identification information of each device in the at least two devices from the backup memory partition according to the request; The target memory partition is restored according to the partition identifier of the target memory partition and the identification information of each device in the at least two devices, so as to restore the access relationship between the at least two devices.
3. The method according to claim 1, It is characterized in that After deleting the target memory partition, the method further includes: Adding the partition identifier of the target memory partition to the deleted memory partition list; Compare the partition identifiers in the deleted memory partition list with the partition identifiers in the backup memory partition; If the partition identifier in the backup memory partition does not belong to the deleted memory partition list, adding deletion indication information reflecting that the target memory partition is mistakenly deleted to the deleted memory partition list; If the partition identifier in the backup memory partition belongs to the deleted memory partition list, deletion indication information is added to the deleted memory partition list to reflect that the target memory partition is not mistakenly deleted.
4. A memory processing device, It is characterized in that include: An acquisition module, used to acquire a target memory partition to be deleted in a target object, and acquire attribute information of the target memory partition; The target memory partition includes relationship indication information of at least two devices accessing the target object, the relationship indication information being used to indicate that there is an access relationship between the at least two devices; the relationship indication information includes identification information of each device in the at least two devices; The verification module includes a first acquisition unit, a verification unit, and a first determination unit; The first acquisition unit is configured to acquire a device identifier of a terminal device that requests to delete the target memory partition when the attribute information is used to reflect the deletion authority of the target memory partition; The verification unit is used to query the possession status of the change lock of the target memory partition; The change lock is used to lock the change operation on the target memory partition; If the occupation state of the change lock of the target memory partition is in an occupied state, obtaining a device identifier of an occupying terminal that occupies the change lock; The first determining unit is configured to determine that the terminal device has deletion authority for the target memory partition if the device identification of the terminal device is the same as the device identification of the occupying terminal; If the terminal device has deletion authority for the target memory partition, determining that the target memory partition is valid; The verification module also includes a second acquisition unit, a second determination unit, and a third determination unit; The second acquisition unit is configured to acquire partition configuration information in the target object when the attribute information is used to reflect the partition identification of the target memory partition, wherein the partition configuration information includes identification information of the memory partition in an activated state; The second determining unit is used to determine a partition identification set of an activated memory partition from the partition configuration information in the target object; a third determining unit, configured to determine that the target memory partition is valid if the partition identifier of the target memory partition belongs to the partition identifier set; The deletion module includes a third acquisition unit, a generation unit, and a deletion unit; The third acquisition unit is configured to acquire a partition identifier of the target memory partition if the target memory partition is valid; The generating unit is used to generate a backup memory partition according to the partition identifier of the target memory partition and the identification information of each device in the at least two devices; The deleting unit is used to delete the target memory partition to release the access relationship between the at least two devices. The recovery module is used to recover the target memory partition according to the backup memory partition if a request for recovering the access relationship between the at least two devices is received, so as to recover the access relationship between the at least two devices.
5. A computer device, It is characterized in that include: Processor and memory; The memory is used to store program codes, and the processor is used to call the program codes to execute the method according to any one of claims 1 to 3.
6. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the steps of the method according to any one of claims 1 to 3 are executed.
