CN115858551B - Memory management method, device, equipment and storage medium based on LDAP - Google Patents
Memory management method, device, equipment and storage medium based on LDAP Download PDFInfo
- Publication number
- CN115858551B CN115858551B CN202310107308.5A CN202310107308A CN115858551B CN 115858551 B CN115858551 B CN 115858551B CN 202310107308 A CN202310107308 A CN 202310107308A CN 115858551 B CN115858551 B CN 115858551B
- Authority
- CN
- China
- Prior art keywords
- memory
- space
- item
- target
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000007726 management method Methods 0.000 title claims abstract description 37
- 238000013486 operation strategy Methods 0.000 claims abstract description 32
- 238000013507 mapping Methods 0.000 claims abstract description 20
- 230000005055 memory storage Effects 0.000 claims abstract description 20
- 238000000034 method Methods 0.000 claims abstract description 18
- 238000013479 data entry Methods 0.000 claims description 24
- 230000004048 modification Effects 0.000 claims description 12
- 238000012986 modification Methods 0.000 claims description 12
- 230000008859 change Effects 0.000 claims description 4
- 238000004590 computer program Methods 0.000 claims description 2
- 230000008569 process Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 4
- 238000007670 refining Methods 0.000 description 4
- 230000007246 mechanism Effects 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Computational Linguistics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the application discloses an LDAP-based memory management method, an LDAP-based memory management device, LDAP-based memory management equipment and a storage medium. The method comprises the following steps: under the condition that data operation is required to be carried out on the LDAP database, determining a target operation type to which the data operation belongs; determining a target memory operation strategy corresponding to the target operation type according to a mapping relation between a preset operation type and a memory operation strategy; and performing data operation in an entry space, an entry information space and an index space of the memory based on the target memory operation policy so as to provide memory storage service when performing data operation on the LDAP database. Based on the method, an item space, an item information space and an index space are divided in the space of the memory, different memory operation strategies are set for different operation types, different spaces are set, the different spaces are matched with an LDAP (lightweight directory access protocol) database, the efficiency of data operation is higher, and the space utilization rate of the memory is also higher.
Description
Technical Field
The embodiment of the application relates to the technical field of distributed databases, in particular to an LDAP-based memory management method, an LDAP-based memory management device, LDAP-based memory management equipment and a storage medium.
Background
With the development and widespread use of cloud computing, there are higher demands on efficient operation of data, where the cloud computing operates on the data and feeds back the results to the application, which spans multiple networks, and the overall operation time exceeds the operation time on a single machine.
In order to increase the operation speed of data, the data is stored by using a memory, which is different from a disk space, and the disk storage space is only used for storing files, data and the like, and the memory also provides space for running the program, so that the high-speed running of the program is ensured, and therefore, a memory management mechanism becomes a key for memory storage.
Disclosure of Invention
The embodiment of the application provides an LDAP-based memory management method, an LDAP-based memory management device, LDAP-based memory management equipment and a storage medium, so that the space utilization rate of a memory and the efficiency of database operation are improved through memory management.
In a first aspect, an embodiment of the present application provides an LDAP-based memory management method, where the method includes:
under the condition that data operation is required to be carried out on an LDAP database, determining a target operation type to which the data operation belongs;
determining a target memory operation strategy corresponding to the target operation type according to a mapping relation between a preset operation type and a memory operation strategy;
and performing data operation in an entry space, an entry information space and an index space of the memory based on the target memory operation strategy so as to provide memory storage service when performing data operation on the LDAP database. In a second aspect, an embodiment of the present application provides an LDAP-based memory management device, where the device includes:
searching whether a target entry index meeting the searching condition in the data operation exists or not from the index space of the memory;
if the target item information exists, searching corresponding target item information from the item information space through the target item index, mapping the target item information to a target data item in the item space, and feeding back the target data item as a query result;
if not, searching a target data item meeting the searching condition in the data operation from a disk of the LDAP database;
extracting key information of the target data item to obtain target item information, and storing the target item information into an item information space of the memory;
and adding the target data item into an item space of the memory, and adding a target item index of the target data item into an item index space of the memory.
In a third aspect, an embodiment of the present application further provides an electronic device, including:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement an LDAP-based memory management method as provided by any of the embodiments of the present application.
In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium having a computer program stored thereon, where the program when executed by a processor implements an LDAP-based memory management method as provided in any of the embodiments of the present application.
According to the technical scheme, under the condition that data operation is required to be carried out on an LDAP database, the target operation type to which the data operation belongs is determined; determining a target memory operation strategy corresponding to the target operation type according to a mapping relation between a preset operation type and a memory operation strategy; and performing data operation in an entry space, an entry information space and an index space of the memory based on the target memory operation strategy so as to provide memory storage service when performing data operation on the LDAP database. Based on this, the embodiment divides the space of the memory according to the LDAP protocol, determines the entry space, the entry information space and the index space, and then sets different memory operation policies for different operation types of data operations, so as to provide memory storage services for the data operations performed on the LDAP database, set different spaces, adapt to the LDAP protocol, and cooperate with the LDAP database, so that the efficiency of data operations is higher, and the space utilization of the memory is also higher.
Drawings
FIG. 1 is a flowchart of an LDAP-based memory management method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an LDAP-based memory management device according to a second embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to a third embodiment of the present application.
Detailed Description
The application is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present application are shown in the drawings.
Example 1
Fig. 1 is a flow chart of an LDAP-based memory management method according to an embodiment of the present application, where the method is applicable to a LDAP-based memory management scenario. The method can be executed by an LDAP-based memory management device which can be realized in a hardware and/or software mode and can be generally integrated in electronic equipment such as a computer with data operation capability, and the like, and specifically comprises the following steps:
step 101, determining a target operation type to which the data operation belongs under the condition that the data operation needs to be performed on the LDAP database.
In this embodiment, since some programs or data entries need to be cached by means of a memory for performing data operations on the LDAP database, the memory is used to cooperate with the data operations performed on the LDAP database, and provides a memory storage service during the data operations.
In this step, the operation type of the data operation may be various, and in a specific embodiment, the target operation type of the data operation is one of the following operation types: adding operation, deleting operation, modifying operation and checking operation.
Wherein the adding operation refers to adding data items into the LDAP database, the deleting operation refers to deleting some data items from the LDAP database, the changing operation refers to modifying data items in the LDAP database, and the searching operation refers to searching required data items from the LDAP database.
Specifically, when determining the target operation type to which the data operation belongs, the step may be determined according to the received data operation instruction, where the data operation instruction generally includes some key program instructions, and these program instructions are generally fixed, so that the target operation type to which the data operation belongs may be determined by identifying the operation type to which the program instruction corresponds.
Step 102, determining a target memory operation strategy corresponding to the target operation type according to a mapping relation between the preset operation type and the memory operation strategy.
In this step, the mapping relationship may be embodied in a program instruction, that is, after the target operation type is identified, the mapping relationship may enter a corresponding memory operation program, where the memory operation program is called a target memory operation policy in this step.
Therefore, the process of determining the target memory operation policy corresponding to the target operation type in this step may be implemented by corresponding program code, such as a common IF statement.
Step 103, performing data operation in the entry space, the entry information space and the index space of the memory based on the target memory operation policy, so as to provide memory storage service when performing data operation on the LDAP database.
It should be noted that, in this step, the entry space, the entry information space, and the index space of the memory may be spaces that are divided from the memory in advance, and since the mechanism of the lightweight directory access protocol (Lightweight Directory Access Protocol, LDAP) mainly sets a unit of data as an entry, the entry is stored as a unit of data on the server, and the unit of the memory management mechanism is that of the entry. The LDAP is used for optimizing the items to form a tree structure for searching and inquiring, so that the LDAP has excellent inquiring performance, is used as a protocol, and also provides a calling rule and a calling mode, standardizes the use of a database and provides better guarantee for data security.
Therefore, to accommodate LDAP, the present embodiment partitions the entry space, the entry information space, and the index space from memory. The entry space is used for storing a data entry structure body, and can be used as a temporary storage party and a provider of a query result, so that the entry space needs to occupy a large space. In order to prevent the memory space from being insufficient, the present embodiment may apply for a certain amount of memory space as the entry space at the system start-up.
In addition, the entry information space is used for storing entry information, the entry information is used for providing a convenient and quick way for operation, and the speed of using a data entry in calling and operation is reduced due to the large memory space occupied by the data entry, so that the embodiment extracts key information of the data entry, stores the key information into entry information, and can improve the speed of calling and operation by directly using the entry information in subsequent calling and operation.
It should be noted that the extracted key information may be some common attribute of the data entry.
The index space in this step is used to store index information of the data entry, and under the LDAP protocol, the index information of the data entry is involved, so in this embodiment, the index space is also set in the memory, and is used to store the corresponding index information, so as to provide an index directory for the subsequent query operation.
The purpose of the memory management in this embodiment is to better divide the memory space, use smaller memory space, process more data volume, and use smaller cost to improve the performance of the LDAP database. In order to determine the size of each space, setting the size of the space in a configuration file of an LDAP database, wherein the entry space corresponds to a cache size attribute in the configuration file, and the unit is an entry; the item information space corresponds to the dndachesize attribute of the configuration file, and the unit is an item; the index space corresponds to the idlcacheize attribute of the configuration file in terms of entries, examples of configuration files are as follows:
the cachesize 1000000# entry space size is 1000000 entries;
the dndachesize 1000000# entry information space size is 1000000 entries;
the iclcachesize 1000000# index space size is 1000000 entries.
Further, in this step, when the target operation type is the increment operation, the process of performing the data operation in the entry space, the entry information space and the index space of the memory based on the target memory operation policy may be:
after adding data to a disk of an LDAP database, acquiring an added data item from a memory; extracting key information of the data item to obtain item information, and storing the item information into an item information space of a memory; and adding the acquired data entry into an entry space of the memory, and adding an entry index of the data entry into an entry index space of the memory.
It should be noted that, the process of extracting the key information of the data entry, that is, extracting the preset attribute in the data entry, is used as the key information. Because the newly added data is generally more likely to be queried, the corresponding information of the newly added data item can be stored in the item space, the item information space and the index space in the memory, so that the corresponding information can be directly acquired from the memory during subsequent query, and the query speed is improved to a certain extent.
In addition, in this step, when the target operation type is a delete operation, the process of performing a data operation in the entry space, the entry information space, and the index space of the memory based on the target memory operation policy may be:
after deleting data from a disk of the LDAP database, searching whether an entry index to be deleted corresponding to the deleted data exists in an entry index space of the memory; if the data entry to be deleted exists, deleting the entry index to be deleted in the entry index space, deleting the entry information to be deleted corresponding to the entry index to be deleted in the entry information space of the memory, and deleting the data entry to be deleted corresponding to the entry index to be deleted in the entry space of the memory.
Since the corresponding data is deleted from the LDAP database, the data is not generally queried later, i.e., the data is not needed, so in order to save memory space, the data entry is synchronously deleted in the entry space, the entry information space and the index space of the memory.
In this step, when the target operation type is the change operation, the process of performing the data operation in the entry space, the entry information space and the index space of the memory based on the target memory operation policy may be:
after carrying out attribute modification on the data items to be modified in the disk of the LDAP database, searching whether an item index to be modified corresponding to the data items to be modified exists in an item index space of the memory; if the data item to be modified exists, searching the information of the item to be modified according to the index of the item to be modified, and searching the corresponding data item to be modified from the item space of the memory through the information of the item to be modified; and carrying out attribute modification on the data items to be modified in the item space of the memory.
It should be noted that, since the modification operation involves modification of the attribute, and the aforementioned refined item information is also composed of the attribute, the embodiment can determine whether the attribute to be modified is key information in the item information to be modified; and modifying the key information in the item information to be modified based on the modified attribute under the condition that the attribute to be modified is the key information in the item information to be modified.
In addition, in this step, when the target operation type is a look-up operation, the process of performing the data operation in the entry space, the entry information space, and the index space of the memory based on the target memory operation policy may be:
searching whether a target entry index meeting the searching condition in the data operation exists or not from the index space of the memory; if the target item information exists, searching corresponding target item information from an item information space through a target item index, mapping the target item information to a target data item in the item space, and feeding back the target data item as a query result; if the target data item does not exist, searching a target data item meeting the searching condition in the data operation from a disk of the LDAP database; extracting key information of a target data item to obtain target item information, and storing the target item information into an item information space of a memory; adding the target data item into an item space of the memory, and adding a target item index of the target data item into an item index space of the memory.
When the data operation of the checking operation is performed, the previous increment operation and the checking operation may store the data item to be queried by the data operation corresponding to the current checking operation in the memory in advance, so that whether the data item exists or not can be queried from the memory. If the data exists, the feedback is directly carried out, and the query efficiency is improved to a certain extent because the data read-write speed of the memory is higher.
In addition, after a certain data item is queried, the data item is generally queried for multiple times in a short time, so that if the data is not stored in the memory, the data item, corresponding item information and index information can be stored in a corresponding space after the data item is queried from the LDAP database, and subsequent re-query is facilitated.
In this embodiment, under the condition that data operation needs to be performed on the LDAP database, determining a target operation type to which the data operation belongs; determining a target memory operation strategy corresponding to the target operation type according to a mapping relation between a preset operation type and a memory operation strategy; and performing data operation in an entry space, an entry information space and an index space of the memory based on the target memory operation policy so as to provide memory storage service when performing data operation on the LDAP database. Based on this, the embodiment divides the space of the memory according to the LDAP protocol, determines the entry space, the entry information space and the index space, and then sets different memory operation policies for different operation types of data operations, so as to provide memory storage services for the data operations performed on the LDAP database, set different spaces, adapt to the LDAP protocol, and cooperate with the LDAP database, so that the efficiency of data operations is higher, and the space utilization of the memory is also higher.
Example two
Fig. 2 is a schematic structural diagram of an LDAP-based memory management device according to a second embodiment of the present application. The memory management device based on the LDAP provided by the embodiment of the application can execute the memory management method based on the LDAP provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects of the execution method. The device may be implemented in software and/or hardware, as shown in fig. 2, and the memory management device based on LDAP specifically includes: a type determination module 201, an operation policy determination module 202, and a memory operation module 203.
The type determining module is used for determining the target operation type to which the data operation belongs under the condition that the data operation is required to be performed on the LDAP database;
the operation strategy determining module is used for determining a target memory operation strategy corresponding to the target operation type according to a mapping relation between the preset operation type and the memory operation strategy;
and the memory operation module is used for performing data operation in an entry space, an entry information space and an index space of the memory based on the target memory operation strategy so as to provide memory storage service when performing data operation on the LDAP database.
In the technical scheme of the embodiment of the application, under the condition that the data operation is required to be carried out on the LDAP database, the target operation type to which the data operation belongs is determined; determining a target memory operation strategy corresponding to the target operation type according to a mapping relation between a preset operation type and a memory operation strategy; and performing data operation in an entry space, an entry information space and an index space of the memory based on the target memory operation policy so as to provide memory storage service when performing data operation on the LDAP database. Based on this, the embodiment divides the space of the memory according to the LDAP protocol, determines the entry space, the entry information space and the index space, and then sets different memory operation policies for different operation types of data operations, so as to provide memory storage services for the data operations performed on the LDAP database, set different spaces, adapt to the LDAP protocol, and cooperate with the LDAP database, so that the efficiency of data operations is higher, and the space utilization of the memory is also higher.
Further, the target operation type of the data operation is one of the following operation types:
adding operation, deleting operation, modifying operation and checking operation.
Further, the target operation type is an increment operation;
the memory operation module comprises:
the data entry acquisition unit is used for acquiring the added data entry from the memory after adding the data to the disk of the LDAP database;
the first refining unit is used for refining the key information of the data item to obtain item information, and storing the item information into an item information space of the memory;
the first adding unit is used for adding the acquired data items into an item space of the memory and adding the item indexes of the data items into an item index space of the memory.
Further, the target operation type is a delete operation;
the memory operation module comprises:
the first searching unit is used for searching whether an entry index to be deleted corresponding to the deleted data exists in an entry index space of the memory after deleting the data from a disk of the LDAP database;
the deleting unit is used for deleting the to-be-deleted item index in the item index space, deleting the to-be-deleted item information corresponding to the to-be-deleted item index in the item information space of the memory, and deleting the to-be-deleted data item corresponding to the to-be-deleted item index in the item information space of the memory if the to-be-deleted item index exists.
Further, the target operation type is a change operation;
the memory operation module comprises:
the second searching unit is used for searching whether an entry index to be modified corresponding to the data entry to be modified exists in an entry index space of the memory after the attribute of the data entry to be modified in the disk of the LDAP database is modified;
the first modification unit is used for searching the information of the item to be modified according to the index of the item to be modified if the information exists, and searching the corresponding item of the data to be modified from the item space of the memory through the information of the item to be modified;
and the second modification unit is used for carrying out attribute modification on the data items to be modified in the item space which is the memory.
Further, the memory operation module further includes:
the judging unit is used for judging whether the attribute to be modified is key information in the item information to be modified;
and a third modification unit, configured to modify the key information in the item information to be modified based on the modified attribute, where the attribute to be modified is the key information in the item information to be modified.
Further, the target operation type is a search operation;
the memory operation module comprises:
a third searching unit for searching whether a target item index meeting the searching condition in the data operation exists in the index space of the memory;
the feedback unit is used for searching corresponding target item information from the item information space through the target item index, mapping the target item information to a target data item in the item space, and feeding back the target data item as a query result if the target item information exists;
a fourth searching unit, configured to find, if not, a target data entry that satisfies a searching condition in the data operation from a disk of the LDAP database;
the second refining unit is used for refining the key information of the target data item to obtain target item information, and storing the target item information into an item information space of the memory;
and the second adding unit is used for adding the target data item into the item space of the memory and adding the target item index of the target data item into the item index space of the memory.
Example III
Fig. 3 is a schematic structural diagram of an electronic device according to a third embodiment of the present application, where, as shown in fig. 3, the electronic device includes a processor 310, a memory 320, an input device 330 and an output device 340; the number of processors 310 in the electronic device may be one or more, one processor 310 being taken as an example in fig. 3; the processor 310, the memory 320, the input device 330 and the output device 340 in the electronic device may be connected by a bus or other means, in fig. 3 by way of example.
The memory 320 is a computer readable storage medium, and may be used to store software programs, computer executable programs, and modules, such as program instructions/modules corresponding to the LDAP-based memory management method in embodiments of the present application. The processor 310 executes various functional applications of the electronic device and LDAP-based memory management by running software programs, instructions and modules stored in the memory 320, i.e., implements the LDAP-based memory management method described above:
under the condition that data operation is required to be carried out on the LDAP database, determining a target operation type to which the data operation belongs;
determining a target memory operation strategy corresponding to the target operation type according to a mapping relation between a preset operation type and a memory operation strategy;
and performing data operation in an entry space, an entry information space and an index space of the memory based on the target memory operation policy so as to provide memory storage service for data operation performed on the LDAP database.
In the technical scheme of the embodiment of the application, under the condition that the data operation is required to be carried out on the LDAP database, the target operation type to which the data operation belongs is determined; determining a target memory operation strategy corresponding to the target operation type according to a mapping relation between a preset operation type and a memory operation strategy; and performing data operation in an entry space, an entry information space and an index space of the memory based on the target memory operation policy so as to provide memory storage service when performing data operation on the LDAP database. Based on this, the embodiment divides the space of the memory according to the LDAP protocol, determines the entry space, the entry information space and the index space, and then sets different memory operation policies for different operation types of data operations, so as to provide memory storage services for the data operations performed on the LDAP database, set different spaces, adapt to the LDAP protocol, and cooperate with the LDAP database, so that the efficiency of data operations is higher, and the space utilization of the memory is also higher.
Memory 320 may include primarily a program storage area and a data storage area, wherein the program storage area may store an operating system, at least one application program required for functionality; the storage data area may store data created according to the use of the terminal, etc. In addition, memory 320 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, memory 320 may further include memory located remotely from processor 310, which may be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Example IV
A fourth embodiment of the present application also provides a storage medium containing computer-executable instructions which, when executed by a computer processor, are configured to perform an LDAP-based memory management method, the method comprising:
under the condition that data operation is required to be carried out on the LDAP database, determining a target operation type to which the data operation belongs;
determining a target memory operation strategy corresponding to the target operation type according to a mapping relation between a preset operation type and a memory operation strategy;
and performing data operation in an entry space, an entry information space and an index space of the memory based on the target memory operation policy so as to provide memory storage service when performing data operation on the LDAP database.
In the technical scheme of the embodiment of the application, under the condition that the data operation is required to be carried out on the LDAP database, the target operation type to which the data operation belongs is determined; determining a target memory operation strategy corresponding to the target operation type according to a mapping relation between a preset operation type and a memory operation strategy; and performing data operation in an entry space, an entry information space and an index space of the memory based on the target memory operation policy so as to provide memory storage service when performing data operation on the LDAP database. Based on this, the embodiment divides the space of the memory according to the LDAP protocol, determines the entry space, the entry information space and the index space, and then sets different memory operation policies for different operation types of data operations, so as to provide memory storage services for the data operations performed on the LDAP database, set different spaces, adapt to the LDAP protocol, and cooperate with the LDAP database, so that the efficiency of data operations is higher, and the space utilization of the memory is also higher.
Of course, the storage medium containing the computer executable instructions provided in the embodiments of the present application is not limited to the above method operations, but may also perform the related operations in the LDAP-based memory management method provided in any embodiment of the present application.
From the above description of embodiments, it will be clear to a person skilled in the art that the present application may be implemented by means of software and necessary general purpose hardware, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, etc., including several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to execute the method of the embodiments of the present application.
It should be noted that, in the above-mentioned embodiments of the search apparatus, each unit and module included are only divided according to the functional logic, but not limited to the above-mentioned division, as long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present application.
Note that the above is only a preferred embodiment of the present application and the technical principle applied. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, while the application has been described in connection with the above embodiments, the application is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the application, which is set forth in the following claims.
Claims (5)
1. An LDAP-based memory management method, the method comprising:
under the condition that data operation is required to be carried out on an LDAP database, determining a target operation type to which the data operation belongs;
determining a target memory operation strategy corresponding to the target operation type according to a mapping relation between a preset operation type and a memory operation strategy;
performing data operation in an entry space, an entry information space and an index space of the memory based on the target memory operation policy, so as to provide memory storage service when performing data operation on an LDAP database;
the target operation type of the data operation is one of the following operation types: adding operation, deleting operation, changing operation and checking operation;
when the target operation type is increment operation; the performing data operations in the entry space, the entry information space and the index space of the memory based on the target memory operation policy includes: after adding data to a disk of an LDAP database, acquiring an added data item from the memory; extracting key information of the data item to obtain item information, and storing the item information into an item information space of the memory; adding the acquired data item into an item space of the memory, and adding an item index of the data item into an item index space of the memory;
when the target operation type is deleting operation; the performing data operations in the entry space, the entry information space and the index space of the memory based on the target memory operation policy includes: after deleting data from a disk of an LDAP database, searching whether an entry index to be deleted corresponding to the deleted data exists in an entry index space of the memory; if the data entry exists, deleting the entry index to be deleted in the entry index space, deleting the entry information to be deleted corresponding to the entry index to be deleted in the entry information space of the memory, and deleting the data entry to be deleted corresponding to the entry index to be deleted in the entry space of the memory;
when the target operation type is the change operation; the performing data operations in the entry space, the entry information space and the index space of the memory based on the target memory operation policy includes: after carrying out attribute modification on a data item to be modified in a disk of an LDAP database, searching whether an item index to be modified corresponding to the data item to be modified exists in an item index space of the memory; if the data item to be modified exists, searching the information of the item to be modified according to the index of the item to be modified, and searching the corresponding data item to be modified from the item space of the memory through the information of the item to be modified; performing attribute modification on data items to be modified in an item space of the memory;
the target operation type is a search operation; the performing data operations in the entry space, the entry information space and the index space of the memory based on the target memory operation policy includes: searching whether a target entry index meeting the searching condition in the data operation exists or not from the index space of the memory; if the target item information exists, searching corresponding target item information from the item information space through the target item index, mapping the target item information to a target data item in the item space, and feeding back the target data item as a query result; if not, searching a target data item meeting the searching condition in the data operation from a disk of the LDAP database; extracting key information of the target data item to obtain target item information, and storing the target item information into an item information space of the memory; and adding the target data item into an item space of the memory, and adding a target item index of the target data item into an item index space of the memory.
2. The method of claim 1, wherein the performing data operations in an entry space, an entry information space, and an index space of the memory based on the target memory operation policy further comprises: judging whether the attribute to be modified is key information in the item information to be modified; and modifying the key information in the item information to be modified based on the modified attribute under the condition that the attribute to be modified is the key information in the item information to be modified.
3. An LDAP-based memory management device, the device comprising: the type determining module is used for determining the target operation type of the data operation under the condition that the data operation is required to be performed on the LDAP database; the operation strategy determining module is used for determining a target memory operation strategy corresponding to the target operation type according to a mapping relation between a preset operation type and a memory operation strategy; the memory operation module is used for performing data operation in an entry space, an entry information space and an index space of the memory based on the target memory operation policy so as to provide memory storage service when performing data operation on an LDAP database;
the target operation type of the data operation is one of the following operation types: adding operation, deleting operation, changing operation and checking operation;
when the target operation type is increment operation; the performing data operations in the entry space, the entry information space and the index space of the memory based on the target memory operation policy includes: after adding data to a disk of an LDAP database, acquiring an added data item from the memory; extracting key information of the data item to obtain item information, and storing the item information into an item information space of the memory; adding the acquired data item into an item space of the memory, and adding an item index of the data item into an item index space of the memory;
when the target operation type is deleting operation; the performing data operations in the entry space, the entry information space and the index space of the memory based on the target memory operation policy includes: after deleting data from a disk of an LDAP database, searching whether an entry index to be deleted corresponding to the deleted data exists in an entry index space of the memory; if the data entry exists, deleting the entry index to be deleted in the entry index space, deleting the entry information to be deleted corresponding to the entry index to be deleted in the entry information space of the memory, and deleting the data entry to be deleted corresponding to the entry index to be deleted in the entry space of the memory;
when the target operation type is the change operation; the performing data operations in the entry space, the entry information space and the index space of the memory based on the target memory operation policy includes: after carrying out attribute modification on a data item to be modified in a disk of an LDAP database, searching whether an item index to be modified corresponding to the data item to be modified exists in an item index space of the memory; if the data item to be modified exists, searching the information of the item to be modified according to the index of the item to be modified, and searching the corresponding data item to be modified from the item space of the memory through the information of the item to be modified; performing attribute modification on data items to be modified in an item space of the memory;
the target operation type is a search operation; the performing data operations in the entry space, the entry information space and the index space of the memory based on the target memory operation policy includes: searching whether a target entry index meeting the searching condition in the data operation exists or not from the index space of the memory; if the target item information exists, searching corresponding target item information from the item information space through the target item index, mapping the target item information to a target data item in the item space, and feeding back the target data item as a query result; if not, searching a target data item meeting the searching condition in the data operation from a disk of the LDAP database; extracting key information of the target data item to obtain target item information, and storing the target item information into an item information space of the memory; and adding the target data item into an item space of the memory, and adding a target item index of the target data item into an item index space of the memory.
4. An electronic device, comprising: one or more processors; storage means for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement an LDAP-based memory management method as set forth in any of claims 1-2.
5. A computer readable storage medium having stored thereon a computer program, which when executed by a processor implements an LDAP-based memory management method as claimed in any of claims 1-2.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310046109 | 2023-01-31 | ||
CN2023100461098 | 2023-01-31 |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115858551A CN115858551A (en) | 2023-03-28 |
CN115858551B true CN115858551B (en) | 2023-11-14 |
Family
ID=85657973
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310107308.5A Active CN115858551B (en) | 2023-01-31 | 2023-02-14 | Memory management method, device, equipment and storage medium based on LDAP |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN115858551B (en) |
WO (1) | WO2024159628A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115858551B (en) * | 2023-01-31 | 2023-11-14 | 天津南大通用数据技术股份有限公司 | Memory management method, device, equipment and storage medium based on LDAP |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101482873A (en) * | 2008-12-18 | 2009-07-15 | 华为技术有限公司 | Method and device for data access |
CN102243654A (en) * | 2011-06-16 | 2011-11-16 | 苏州阔地网络科技有限公司 | Method and device for controlling and managing database connections |
CN103164490A (en) * | 2011-12-19 | 2013-06-19 | 北京新媒传信科技有限公司 | Method and device for achieving high-efficient storage of data with non-fixed lengths |
CN103714080A (en) * | 2012-09-29 | 2014-04-09 | 北京百度网讯科技有限公司 | Spatial index structure tree based method and device for providing results of searching spatial objects |
CN109344159A (en) * | 2018-10-15 | 2019-02-15 | 北京天融信网络安全技术有限公司 | For the lookup method of LDAP, device, electronic equipment and storage medium |
CN111046041A (en) * | 2019-12-09 | 2020-04-21 | 珠海格力电器股份有限公司 | Data processing method and device, storage medium and processor |
CN111475584A (en) * | 2020-06-19 | 2020-07-31 | 阿里云计算有限公司 | Data processing method, system and device |
CN114116720A (en) * | 2021-11-25 | 2022-03-01 | 上海派拉软件股份有限公司 | Online database management method, device, equipment and storage medium |
CN115168310A (en) * | 2022-06-29 | 2022-10-11 | 北京飞讯数码科技有限公司 | Log management method, device, medium and system in LDAP system |
CN115587097A (en) * | 2022-10-17 | 2023-01-10 | 长春吉大正元信息技术股份有限公司 | Directory node information query method, device, equipment and storage medium |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8620926B2 (en) * | 2008-01-14 | 2013-12-31 | International Business Machines Corporation | Using a hashing mechanism to select data entries in a directory for use with requested operations |
US20150293783A1 (en) * | 2014-04-09 | 2015-10-15 | International Business Machines Corporation | Scheduling identity manager reconciliation to execute at an optimal time |
CN115858551B (en) * | 2023-01-31 | 2023-11-14 | 天津南大通用数据技术股份有限公司 | Memory management method, device, equipment and storage medium based on LDAP |
-
2023
- 2023-02-14 CN CN202310107308.5A patent/CN115858551B/en active Active
- 2023-04-13 WO PCT/CN2023/088013 patent/WO2024159628A1/en unknown
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101482873A (en) * | 2008-12-18 | 2009-07-15 | 华为技术有限公司 | Method and device for data access |
CN102243654A (en) * | 2011-06-16 | 2011-11-16 | 苏州阔地网络科技有限公司 | Method and device for controlling and managing database connections |
CN103164490A (en) * | 2011-12-19 | 2013-06-19 | 北京新媒传信科技有限公司 | Method and device for achieving high-efficient storage of data with non-fixed lengths |
CN103714080A (en) * | 2012-09-29 | 2014-04-09 | 北京百度网讯科技有限公司 | Spatial index structure tree based method and device for providing results of searching spatial objects |
CN109344159A (en) * | 2018-10-15 | 2019-02-15 | 北京天融信网络安全技术有限公司 | For the lookup method of LDAP, device, electronic equipment and storage medium |
CN111046041A (en) * | 2019-12-09 | 2020-04-21 | 珠海格力电器股份有限公司 | Data processing method and device, storage medium and processor |
CN111475584A (en) * | 2020-06-19 | 2020-07-31 | 阿里云计算有限公司 | Data processing method, system and device |
CN114116720A (en) * | 2021-11-25 | 2022-03-01 | 上海派拉软件股份有限公司 | Online database management method, device, equipment and storage medium |
CN115168310A (en) * | 2022-06-29 | 2022-10-11 | 北京飞讯数码科技有限公司 | Log management method, device, medium and system in LDAP system |
CN115587097A (en) * | 2022-10-17 | 2023-01-10 | 长春吉大正元信息技术股份有限公司 | Directory node information query method, device, equipment and storage medium |
Non-Patent Citations (1)
Title |
---|
基于SSM框架的英语口语测评系统研究;许秀云 等;《微型电脑应用》;第 36卷(第11 期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN115858551A (en) | 2023-03-28 |
WO2024159628A1 (en) | 2024-08-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110489417B (en) | Data processing method and related equipment | |
CN108255958B (en) | Data query method, device and storage medium | |
CA2562281C (en) | Partial query caching | |
CN111221840A (en) | Data processing method and device, data caching method, storage medium and system | |
CN110515979B (en) | Data query method, device, device and storage medium | |
CN109903034B (en) | Rule matching method and device, computer readable storage medium and computer equipment | |
CN110688201B (en) | Log management method and related equipment | |
CN115858551B (en) | Memory management method, device, equipment and storage medium based on LDAP | |
CN113254470B (en) | Data modification method, device, computer equipment and storage medium | |
CN110908996A (en) | Data processing method and device | |
US11683316B2 (en) | Method and device for communication between microservices | |
CN112306957B (en) | Method, device, computing device and storage medium for obtaining index node number | |
CN104536785B (en) | Real-time system update method and device | |
US7441252B2 (en) | Cache control device, and method and computer program for the same | |
CN112835873A (en) | Service access method, system, device and medium for grid regulation and control heterogeneous system | |
CN113656438B (en) | Data query method and device for data tree | |
CN107977381B (en) | Data configuration method, index management method, related device and computing equipment | |
CN116700929A (en) | Task batch processing method and system based on artificial intelligence | |
CN116450607A (en) | Data processing method, device and storage medium | |
CN115037799B (en) | Current limiting method, device, equipment and medium | |
CN114138829B (en) | Method, system and network equipment for sharing Prepare State | |
CN113704302B (en) | Massive data retrieval method, system, terminal and storage medium based on HASH mapping | |
CN116561106B (en) | Configuration item data management method and system | |
CN118200312A (en) | File downloading method and related device | |
CN116226129A (en) | Data access method, device, storage medium and equipment in intelligent contract |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |