Dictionary object searching method and device, equipment, medium and product

By creating hash table record loading control objects for distributed database nodes, the performance bottleneck of metadata nodes is solved, the thread duplication request is reduced, access pressure is reduced, and system efficiency is improved.

CN120448366APending Publication Date: 2025-08-08SHANGHAI DAMENG DATABASE
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510594626.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

In a distributed database system, the metadata nodes have performance bottlenecks due to processing a large number of dictionary object acquisition requests, and multiple threads repeatedly request dictionary objects from the metadata nodes, resulting in increased access pressure.

Method used

Create a hash table record for each node. When looking for the target dictionary object, create a new load control object in the local hash table and modify the status, load the target dictionary object into the local buffer, and reduce duplicate requests.

Benefits of technology

By reducing the repeated loading requests of the metadata nodes by threads, the access pressure of the metadata nodes is reduced and the system's operating efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120448366A_ABST
    Figure CN120448366A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a dictionary object searching method and device, equipment, a medium and a product, and the method comprises the steps: for each node in a distributed database, searching a loading control object matched with a target dictionary object in a hash table corresponding to the node under the condition that the target dictionary object does not exist in a local global dictionary buffer area; if the loading control object matched with the target dictionary object does not exist in the hash table, a new loading control object is created in the hash table, the loading state in the new loading control object is modified to be loading, and the new loading control object is matched with the target dictionary object; according to the method, the target dictionary object is loaded from the metadata node in the distributed database, the target dictionary object obtained through loading is stored in the local global dictionary buffer area, the loading state is modified to be successful loading, repeated dictionary loading requests of different threads on the metadata node are reduced, and the access pressure of the metadata node is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of database technology, and in particular to a method, apparatus, device, medium, and product for searching a dictionary object. Background Art

[0002] In a distributed database system, when a compute node (CN) or data node (DN) needs to retrieve a dictionary object, it sends a request to the metadata node (MD) through inter-node communication. When a database system has a large number of connections, which puts heavy pressure on the MD, the metadata node may handle a large number of dictionary object requests simultaneously. This can lead to performance bottlenecks in the MD due to factors such as communication with the central processing unit (CPU), thus affecting the overall system efficiency.

[0003] When accessing a dictionary object for the first time, the data dictionary object will be obtained from the MD. In actual applications, the dictionary objects in the global dictionary buffer may be eliminated. As long as the dictionary object cache to be obtained is not found in the global dictionary buffer, it is necessary to obtain the dictionary object from the MD, and multiple threads may simultaneously obtain the same dictionary object. It is easy to think that for multiple threads on the same node (non-MD), if the same dictionary object is obtained, there is no need for all threads to send a request to the metadata node to obtain it. The dictionary object cache can be obtained through only one request and saved in the local global buffer. Other sessions can obtain the dictionary cache in the local global buffer. However, the problem with this method is that other nodes do not know whether the dictionary object to be obtained has been loaded. If this problem cannot be solved, multiple threads will still obtain the data dictionary from the MD, which will cause the performance bottleneck mentioned above. Summary of the Invention

[0004] The embodiments of the present disclosure provide a dictionary object search method, apparatus, device, medium, and product, which reduce repeated dictionary loading requests for metadata nodes by different threads and reduce the access pressure of metadata nodes.

[0005] In a first aspect, a method for searching a dictionary object is provided, comprising:

[0006] For each node in the distributed database, if the target dictionary object does not exist in the local global dictionary buffer, searching for a load control object matching the target dictionary object in the hash table corresponding to the node; the target dictionary object is a search object for the target thread in the node;

[0007] If there is no load control object matching the target dictionary object in the hash table, creating a new load control object in the hash table, and changing the loading state in the new load control object to loading, so that the new load control object matches the target dictionary object;

[0008] The target dictionary object is loaded from the metadata node in the distributed database, the loaded target dictionary object is saved to the local global dictionary buffer, and the loading status is modified to loading success.

[0009] In a second aspect, a device for searching a dictionary object is provided, comprising:

[0010] A first search module is configured to search, for each node in the distributed database, a load control object matching the target dictionary object in a hash table corresponding to the node if the target dictionary object does not exist in the local global dictionary buffer; the target dictionary object is a search object for a target thread in the node;

[0011] a creation module configured to create a new load control object in the hash table if no load control object matching the target dictionary object exists in the hash table, and modify the loading state in the new load control object to loading, wherein the new load control object matches the target dictionary object;

[0012] The loading module is used to load the target dictionary object from the metadata node in the distributed database, save the loaded target dictionary object to the local global dictionary buffer, and modify the loading status to loading success.

[0013] According to a third aspect, an electronic device is provided, including:

[0014] at least one processor; and,

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the dictionary object search method as described in the first aspect above.

[0017] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the method for searching a dictionary object as described in the first aspect is implemented.

[0018] In a fifth aspect, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the dictionary object search method as described in the first aspect.

[0019] The present disclosure discloses a method, apparatus, device, medium, and product for searching a dictionary object. The method includes: for each node in a distributed database, if a target dictionary object does not exist in a local global dictionary buffer, searching a hash table corresponding to the node for a load control object that matches the target dictionary object; the target dictionary object is a search object for a target thread in the node; if a load control object that matches the target dictionary object does not exist in the hash table, creating a new load control object in the hash table and modifying the loading status of the new load control object to loading, so that the new load control object matches the target dictionary object; loading the target dictionary object from a metadata node in the distributed database, saving the loaded target dictionary object to the local global dictionary buffer, and modifying the loading status to loading successfully. This technical solution creates a hash table for each node to store a load control object, which is used to record the loading status of the target dictionary object. If the load control object does not exist, a new load control object is created and the loading status of the load control object is modified to complete the acquisition of the target dictionary object, thereby reducing repeated dictionary loading requests from different threads to metadata nodes and reducing access pressure on metadata nodes.

[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the embodiments of the present disclosure. Other features of the embodiments of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0022] Figure 1 This is a flowchart of a method for searching a dictionary object provided in the first embodiment of the present disclosure;

[0023] Figure 2 This is a schematic diagram of the execution process of the dictionary object search method provided in the first embodiment of the present disclosure;

[0024] Figure 3This is a schematic diagram of the structure of a device for searching a dictionary object provided in the second embodiment of the present disclosure;

[0025] Figure 4 This is a structural diagram of an electronic device provided in Example 3 of the present disclosure. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the solutions of the embodiments of the present disclosure, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the embodiments described are only part of the embodiments of the present disclosure, not all of them. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the embodiments of the present disclosure.

[0027] It should be noted that the terms "first", "second", etc. in the description and claims of the embodiments of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] Example 1

[0029] Figure 1 This is a flowchart of a method for searching a dictionary object provided in the first embodiment of the present disclosure. This embodiment is applicable to the case of searching a dictionary object. The method can be executed by a dictionary object search device. The dictionary object search device can be implemented in the form of hardware and / or software. The dictionary object search device can be configured in an electronic device, including but not limited to computers, computers, terminals, servers and other devices with data processing capabilities. Figure 1 As shown, the method includes:

[0030] S110. For each node in the distributed database, if the target dictionary object does not exist in the local global dictionary buffer, search the hash table corresponding to the node for a load control object that matches the target dictionary object; the target dictionary object is the search object of the target thread in the node.

[0031] In this embodiment, the data dictionary can be a directory that can be accessed by users and records database and application metadata. The content is a physical and logical description of the database table information. The data dictionary content can usually be obtained through the object id and object name of the dictionary. For example, when a thread of node A accesses the dictionary object to the MD for the first time, the system can construct a data dictionary object based on the metadata and load the data dictionary into the global dictionary buffer of the MP and node A respectively. Each node has a global dictionary buffer. At the same time, in order to record the loading of the dictionary object, a new structure is introduced as a loading control object. The loading control object records the id or name of the dictionary object being loaded, the loading status (load_status), the occupancy count (n_fix) and other information. Among them, the loading status load_status indicates the status of the data dictionary loading, which is divided into loading, loading completion (subdivided into loading success, loading failure) and several other states; the occupancy count (n_fix) indicates the number of threads currently waiting for the dictionary object to be loaded.

[0032] Continuing with the above description, a distributed database typically consists of one metadata node, multiple compute nodes, and multiple data nodes. Compute nodes (CNs) receive and process client requests and do not store any data themselves. Data nodes (DNs) are data storage modules that provide data to compute nodes and handle their data modification and access requests. Metadata nodes (MDs) are metadata storage modules that provide metadata support for the entire distributed environment.

[0033] Specifically, for each node in the distributed database, if the target dictionary object does not exist in the local global dictionary buffer, the node's corresponding hash table can be searched to see if a load control object matching the target dictionary object exists. The target dictionary object is the search object for the target thread in the node, which can be a compute node or a data node.

[0034] S120: If there is no loading control object matching the target dictionary object in the hash table, create a new loading control object in the hash table, and change the loading state in the new loading control object to loading. The new loading control object matches the target dictionary object.

[0035] Specifically, if a load control object matching the target dictionary object doesn't exist in the hash table, a new load control object can be created in the hash table, with the loading state set to loading, the ID or name of the corresponding dictionary object to be looked up recorded, and the load control object inserted into the corresponding hash table. It should be noted that the newly created load control object matches the target dictionary object and can therefore record information about the target dictionary object during the loading process.

[0036] S130 , loading a target dictionary object from a metadata node in a distributed database, saving the loaded target dictionary object to a local global dictionary buffer, and changing the loading status to loading success.

[0037] Specifically, after creating a new load control object, a request message can be sent to the metadata node, which can then load the target dictionary object from the metadata node in the distributed database. After the target dictionary object is loaded, the loaded target dictionary object can be saved to the local global dictionary buffer, and the loading status in the new load control object can be changed to load successful.

[0038] This embodiment provides a dictionary object search method, including: for each node in a distributed database, if the target dictionary object does not exist in the local global dictionary buffer, searching for a loading control object that matches the target dictionary object in the hash table corresponding to the node; the target dictionary object is the search object of the target thread in the node; if the loading control object that matches the target dictionary object does not exist in the hash table, creating a new loading control object in the hash table, and modifying the loading status in the new loading control object to loading, and the new loading control object matches the target dictionary object; loading the target dictionary object from the metadata node in the distributed database, saving the loaded target dictionary object to the local global dictionary buffer, and modifying the loading status to loading successfully, thereby reducing repeated dictionary loading requests to metadata nodes by different threads and reducing the access pressure on metadata nodes.

[0039] As an optional implementation of this embodiment, before searching the hash table corresponding to the node for a loading control object that matches the target dictionary object, the method further includes:

[0040] In a case where the target dictionary object exists in the local global dictionary buffer, the target dictionary object is loaded from the local global dictionary buffer.

[0041] It can be seen that when the target thread in the node searches for the target dictionary object, it can first check whether the target dictionary object exists in the local global dictionary buffer. If the target dictionary object exists in the local global dictionary buffer, it can directly load the target dictionary object from the local global dictionary buffer.

[0042] As an optional implementation of this embodiment, each node corresponds to two hash tables, one hash table is used to search for the load control object by ID, and the other hash table is used to search for the load control object by name;

[0043] Before searching the hash table corresponding to the node for a load control object that matches the target dictionary object, the method further includes:

[0044] According to the search task input by the user, a hash table used to search for the loading control object in the node is determined.

[0045] It should be noted that each node corresponds to two hash tables, one of which is used to search for load control objects by ID, and the other is used to search for load control objects by name. A user's search task can be obtained, and based on the search task input by the user, the hash table used to search for load control objects in the node can be determined from the two hash tables. For example, if the search task input by the user is a search task by ID, the hash table used to search for load control objects by ID can be used as the hash table used to search for load control objects in the node.

[0046] When initializing the database, two hash tables can be created for each node, corresponding to the tasks of searching the dictionary by the dictionary object ID and searching the dictionary by the dictionary object name, respectively, for recording the above-mentioned loading control objects.

[0047] As an optional implementation of this embodiment, the method further includes:

[0048] In the case that the target dictionary object fails to be loaded from the metadata node, the loading state is set to loading failure, and an error is reported to a non-target thread whose dictionary object loaded in the node is the target dictionary object.

[0049] It is known that after creating a new load control object, a request message can be sent to the metadata node, which can then load the target dictionary object from the metadata node in the distributed database. If the target dictionary object fails to be loaded from the metadata node, the loading status in the new load control object can be changed to load failure.

[0050] Continuing with the above description, the loaded dictionary object in the node can also report errors to other non-target threads of the target dictionary object to prevent a large number of thread retries in this node from causing a large number of conflicts in the hash table, affecting the operating efficiency of the node (such as computing node / data node).

[0051] As an optional implementation of this embodiment, the method further includes:

[0052] 1) If there is a load control object matching the target dictionary object in the hash table, and the loading status in the load control object matching the target dictionary object is loading, the occupancy count in the load control object matching the target dictionary object is increased by 1, and the target thread is suspended.

[0053] Specifically, if there is a loading control object that matches the target dictionary object in the hash table, and the loading status in the loading control object is loading, it can be considered that other threads other than the target thread are also searching for the target dictionary object. At this time, in order to reduce repeated dictionary loading requests for metadata nodes by different threads, the occupancy count in the loading control object that matches the target dictionary object can be increased by 1, indicating that concurrency has occurred and the target thread also needs to search for the target dictionary object, and the target thread is suspended. Among them, the suspension of the target thread can be understood as the execution of the target thread being temporarily interrupted and entering a waiting state. At this time, the target thread has not terminated, but is in a suspended execution state, waiting for certain conditions to be met before resuming execution.

[0054] 2) When the loading state in the loading control object matching the target dictionary object is changed to loading completed, the occupancy count in the loading control object is reduced by 1.

[0055] It can be known that the loading status in the loading control object matching the target dictionary object can be monitored. When the loading status in the loading control object matching the target dictionary object changes to loading completion, the occupancy count in the loading control object can be reduced by 1 to indicate that loading of the target thread is completed.

[0056] 3) Obtain the target dictionary object according to the occupancy count and the loading status.

[0057] Specifically, after the occupancy count in the load control object is reduced by 1, the target dictionary object can be obtained based on the value of the occupancy count. For example, if the occupancy count is not 0, it can be considered that the concurrency situation has not ended. If the occupancy count is 0, it can be considered that the concurrency situation has ended. If the loading status is successful, the target dictionary object can be obtained from the local global dictionary buffer.

[0058] As an optional implementation manner of this embodiment, obtaining the target dictionary object according to the occupancy count and the loading status includes:

[0059] If the occupancy count is 0, the loading status of the loading control object is saved, the loading control object is deleted, and if the loading status is loading success, the target dictionary object is obtained from the local global dictionary buffer; if the loading status is loading failure, an error is reported to the target thread.

[0060] Specifically, if the occupancy count is 0, the loading status of the load control object is recorded, which will be used as a basis for subsequent judgment of loading success or failure. The load control object is then deleted from the hash table and released. Based on the recorded loading status, if the loading status is successful, the target dictionary object can be obtained from the local global dictionary buffer. If it fails, an error is directly reported. If the occupancy count is not 0, it means that the current concurrency situation has not yet ended, and the load control object must still be retained to allow other concurrent threads to load.

[0061] Figure 2 A schematic diagram of the execution process of a dictionary object search method provided in this embodiment, such as Figure 2 As shown. First, determine the search method. If searching by id, the following operations are performed only on the hash table corresponding to the task searched by id. If searching by name, the following operations are performed only on the hash table corresponding to the task searched by name. When the search begins, the thread on the node (let's call it thread A) searches for the target dictionary object and first attempts to load it from the local global dictionary buffer. If the target dictionary object exists in the local global dictionary buffer, it is loaded from the local global dictionary buffer.

[0062] If the object cannot be loaded in the local global dictionary buffer, the system attempts to search for the load control object corresponding to the current object in the hash table. If it is not found, it means that the current node has no loading tasks. In this case, a new load control object is created, the state is set to loading, the ID or name of the corresponding dictionary object to be searched is recorded, the load control object is inserted into the corresponding hash table, the loading state in the newly created load control object is changed to loading, and a request message is sent to the metadata node to load the dictionary object. After successful loading, the loaded target dictionary object is saved to the local global dictionary buffer and the loading state is changed to loaded successfully.

[0063] If thread A finds the loading control object, and the loading status is loading (indicating that thread B is loading), thread A will increase the occupancy count by one, and suspend thread A to wait for the loading status to change. After the loading status changes to loading completion, thread A will reduce the occupancy count by one (each thread reduces its own increased count). If the occupancy count is 0, the loading control object will be deleted from the hash table and released. Determine the loading status. If the load is successful, the target dictionary object will be retrieved from the local global dictionary buffer. If the load fails, an error will be reported directly, and this method will end. When the occupancy count is 0, it means that the current concurrency has ended. At this time, the loading control object will be automatically deleted from the hash table and released. When the occupancy count is not 0, it means that the current concurrency has not ended. The loading control object still needs to be retained for the subsequent loading process of the target dictionary object.

[0064] In particular, when the query to load the dictionary object from the metadata node fails, other waiting threads should also report an error directly. Otherwise, a large number of threads may retry on this node, resulting in a large number of conflicts in the hash table, affecting the operating efficiency of the computing node / data node.

[0065] The above technical solution is specifically used in scenarios where multiple threads of the same node concurrently request data dictionary objects from the MD. Two hash tables are created for each node, and the id or name of the dictionary object being loaded is recorded in the hash table. Before each thread of the node requests the MD to load a dictionary object, it determines whether the current dictionary object is being loaded based on the record in the hash table of the current node. If a thread is already loading a dictionary object, this thread does not need to load it again, and can directly use the dictionary object that has been loaded into the global buffer of the current node. This reduces repeated dictionary loading requests from different threads to metadata nodes and reduces the access pressure on metadata nodes.

[0066] Example 2

[0067] Figure 3 This is a schematic diagram of a device for searching a dictionary object provided in the second embodiment of the present disclosure; Figure 3 As shown, the device includes: a first search module 210 , a creation module 220 , and a loading module 230 .

[0068] The first search module 210 is configured to search, for each node in the distributed database, a load control object matching the target dictionary object in a hash table corresponding to the node if the target dictionary object does not exist in the local global dictionary buffer; the target dictionary object is a search object for a target thread in the node;

[0069] a creation module 220 for creating a new load control object in the hash table if no load control object matching the target dictionary object exists in the hash table, and changing the loading state in the new load control object to loading, wherein the new load control object matches the target dictionary object;

[0070] The loading module 230 is configured to load the target dictionary object from the metadata node in the distributed database, save the loaded target dictionary object to the local global dictionary buffer, and modify the loading status to loading success.

[0071] A second embodiment of the present disclosure provides a device for searching a dictionary object, which reduces repeated dictionary loading requests to metadata nodes by different threads and reduces the access pressure on metadata nodes.

[0072] Furthermore, the device further comprises:

[0073] An error reporting module is used to set the loading state to loading failure when the target dictionary object fails to be loaded from the metadata node, and report an error to a non-target thread whose dictionary object loaded in the node is the target dictionary object.

[0074] Furthermore, the device further comprises:

[0075] a suspending module, configured to, if a load control object matching the target dictionary object exists in the hash table and the loading state of the load control object matching the target dictionary object is loading, increase the occupancy count in the load control object matching the target dictionary object by 1, and suspend the target thread;

[0076] a modification module, configured to decrement the occupancy count in the loading control object by 1 when the loading state in the loading control object matching the target dictionary object is changed to loading completed;

[0077] An acquisition module is configured to acquire the target dictionary object according to the occupancy count and the loading status.

[0078] Furthermore, the acquisition module is further configured to:

[0079] If the occupancy count is 0, the loading status of the loading control object is saved, the loading control object is deleted, and if the loading status is loading success, the target dictionary object is obtained from the local global dictionary buffer; if the loading status is loading failure, an error is reported to the target thread.

[0080] Furthermore, the device further comprises:

[0081] The loading module is configured to load the target dictionary object from the local global dictionary buffer when the target dictionary object exists in the local global dictionary buffer.

[0082] Furthermore, each node corresponds to two hash tables, one of which is used to look up the load control object by id, and the other hash table is used to look up the load control object by name;

[0083] The device further comprises:

[0084] The search module is used to determine a hash table used to search for a loading control object in the node according to a search task input by a user.

[0085] The dictionary object search device provided by the embodiments of the present disclosure can execute the dictionary object search method provided by any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0086] Example 3

[0087] Figure 4 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The components shown herein, their connections and relationships, and their functions are provided for example only and are not intended to limit the implementation of the embodiments of the present disclosure described and / or claimed herein.

[0088] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0089] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0090] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microprocessor, etc. The processor 11 executes the various methods and processes described above, such as the dictionary object lookup method.

[0091] In some embodiments, the method for searching a dictionary object may be implemented as a computer program that is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for searching a dictionary object described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the method for searching a dictionary object in any other appropriate manner (e.g., by means of firmware).

[0092] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0093] The computer programs for implementing the methods of the embodiments of the present disclosure may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer programs are executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer programs may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0094] In the context of the embodiments of the present disclosure, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. A computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0095] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0096] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0097] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0098] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the embodiments of the present disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions of the embodiments of the present disclosure can be achieved, and this document is not limited here.

[0099] The above specific implementations do not constitute a limitation on the scope of protection of the embodiments of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the embodiments of the present disclosure shall be included within the scope of protection of the embodiments of the present disclosure.

[0100] The embodiments of the present disclosure further provide a computer program product, including a computer program and / or instructions, which, when executed by a processor, implements the dictionary object search method provided in any embodiment of the present application.

[0101] During implementation, the computer program product may be written in one or more programming languages or a combination thereof to write computer program code for performing the operations of the disclosed embodiments, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0102] Note that the above are only preferred embodiments of the present disclosure and the technical principles used. Those skilled in the art will understand that the present disclosure is not limited to the specific embodiments herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present disclosure. Therefore, although the present disclosure is described in more detail through the above embodiments, the present disclosure is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present disclosure, and the scope of the present disclosure is determined by the scope of the appended claims.

Claims

1. A method for searching a dictionary object, characterized in that: include: For each node in the distributed database, if the target dictionary object does not exist in the local global dictionary buffer, searching for a load control object matching the target dictionary object in the hash table corresponding to the node; The target dictionary object is a search object for the target thread in the node; If there is no load control object matching the target dictionary object in the hash table, creating a new load control object in the hash table, and changing the loading state in the new load control object to loading, so that the new load control object matches the target dictionary object; The target dictionary object is loaded from the metadata node in the distributed database, the loaded target dictionary object is saved to the local global dictionary buffer, and the loading status is modified to loading success.

2. The method according to claim 1, characterized in that The method further comprises: In the case that the target dictionary object fails to be loaded from the metadata node, the loading state is set to loading failure, and an error is reported to a non-target thread whose dictionary object loaded in the node is the target dictionary object.

3. The method according to claim 1, characterized in that The method further comprises: If a load control object matching the target dictionary object exists in the hash table, and the loading state of the load control object matching the target dictionary object is loading, then the occupancy count of the load control object matching the target dictionary object is increased by 1, and the target thread is suspended; When the loading state in the loading control object matching the target dictionary object is changed to loading completed, the occupancy count in the loading control object is reduced by 1; The target dictionary object is acquired according to the occupancy count and the loading status.

4. The method according to claim 3, characterized in that The acquiring the target dictionary object according to the occupancy count and the loading status includes: If the occupancy count is 0, the loading status of the loading control object is saved, the loading control object is deleted, and if the loading status is loading success, the target dictionary object is obtained from the local global dictionary buffer; if the loading status is loading failure, an error is reported to the target thread.

5. The method according to claim 1, wherein Before searching the hash table corresponding to the node for a load control object that matches the target dictionary object, the method further includes: In a case where the target dictionary object exists in the local global dictionary buffer, the target dictionary object is loaded from the local global dictionary buffer.

6. The method according to claim 5, characterized in that Each node corresponds to two hash tables, one of which is used to find the load control object by id, and the other hash table is used to find the load control object by name; Before searching the hash table corresponding to the node for a load control object that matches the target dictionary object, the method further includes: According to the search task input by the user, a hash table used to search for the loading control object in the node is determined.

7. A device for searching a dictionary object, characterized in that: include: A first search module is configured to search, for each node in the distributed database, for a load control object matching the target dictionary object in a hash table corresponding to the node if the target dictionary object does not exist in the local global dictionary buffer; The target dictionary object is a search object for the target thread in the node; a creation module configured to create a new load control object in the hash table if no load control object matching the target dictionary object exists in the hash table, and modify the loading state in the new load control object to loading, wherein the new load control object matches the target dictionary object; The loading module is used to load the target dictionary object from the metadata node in the distributed database, save the loaded target dictionary object to the local global dictionary buffer, and modify the loading status to loading success.

8. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to execute the dictionary object search method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for searching a dictionary object according to any one of claims 1 to 6 is implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program implements the dictionary object search method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Dictionary conversion method and device, vehicle and storage medium

    CN117608703A

  • Method and device for using data dictionary of database, medium and product

    CN118277430A

  • Configuration method and device of data dictionary table, equipment and medium

    CN119557303A

  • Optimizing single-value database read operations using a single value cache

    US20150324382A1