CN116049176A - Data processing method, system, device, equipment and readable storage medium - Google Patents

Data processing method, system, device, equipment and readable storage medium Download PDF

Info

Publication number
CN116049176A
CN116049176A CN202211674977.2A CN202211674977A CN116049176A CN 116049176 A CN116049176 A CN 116049176A CN 202211674977 A CN202211674977 A CN 202211674977A CN 116049176 A CN116049176 A CN 116049176A
Authority
CN
China
Prior art keywords
database subsystem
dynamic database
subsystem
dynamic
database
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.)
Pending
Application number
CN202211674977.2A
Other languages
Chinese (zh)
Inventor
陈国�
白国涛
张春
周婧
屈莹
黄薇
崔凯峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Information Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Information Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202211674977.2A priority Critical patent/CN116049176A/en
Publication of CN116049176A publication Critical patent/CN116049176A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application provides a data processing method, a system, a device, equipment and a readable storage medium, wherein the method comprises the following steps: acquiring a request instruction of a user; inquiring whether a database object for executing the request instruction is contained in the first dynamic database subsystem according to the information carried in the request instruction; under the condition that the first dynamic database subsystem does not contain the database object for executing the request instruction, inquiring the address of a second dynamic database subsystem where the database object for executing the request instruction is located from a pre-established global data dictionary mapping table; sending a request instruction to the second dynamic database subsystem according to the address of the second dynamic database subsystem; executing the request instruction based on the database object in the second dynamic database subsystem substantially reduces access latency that may be triggered by accessing across non-uniform memory access nodes.

Description

Data processing method, system, device, equipment and readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data processing method, system, device, equipment, and readable storage medium.
Background
The existing database management system is generally based on a shared memory mechanism, so that multi-process parallel processing of business logic is realized. Because the process can run in any central processing unit core and can also access the memory in any position, the problem that the central processing unit core accesses the memory across nodes is likely to occur under the condition that the host is of a non-uniform memory access architecture, and then the problem of access delay is caused.
Disclosure of Invention
The embodiment of the application provides a data processing method, a system, a device, equipment and a readable storage medium, which can reduce access delay which is possibly triggered by cross NUMA node access.
In a first aspect, an embodiment of the present application provides a data processing method, where the data processing method is applied to a database management system, where the database management system includes a plurality of dynamic database subsystems, and the dynamic database subsystems include a CPU and a memory module under the same node, and the data processing method includes:
acquiring a request instruction of a user;
inquiring whether a database object for executing the request instruction is contained in a first dynamic database subsystem or not according to information carried in the request instruction, wherein the first dynamic database subsystem is a current dynamic database subsystem;
Under the condition that the first dynamic database subsystem does not contain the database object for executing the request instruction, inquiring the address of a second dynamic database subsystem where the database object for executing the request instruction is located from a pre-established global data dictionary mapping table, wherein the second dynamic database subsystem is a dynamic database subsystem different from the first dynamic database subsystem;
sending a request instruction to the second dynamic database subsystem according to the address of the second dynamic database subsystem;
the request instruction is executed based on the database object in the second dynamic database subsystem.
In one possible implementation, the database management system further includes a control coordination module and a root database subsystem; before acquiring the request instruction of the user, the method further comprises the following steps:
the control coordination module writes in the configuration file;
the root database subsystem reads and controls the configuration file in the coordination module to initialize.
In one possible implementation embodiment, the initializing according to the configuration file in the database subsystem read control coordination module specifically includes:
the root database subsystem creates a shared memory segment of the control coordination module and a shared memory segment of the root database subsystem according to the configuration file;
The root database subsystem starts each dynamic database subsystem one by one;
the dynamic database subsystem binds the CPU of the corresponding node, creates a shared memory, and binds the shared memory base address of the dynamic database subsystem;
the dynamic database subsystem registers the database object held by itself into the global data dictionary mapping table.
In one possible implementation embodiment, the information carried in the request instruction includes identification information of the database object, the identification information including at least one of a name of the database object and an ID of the database object;
inquiring whether the first dynamic database subsystem contains a database object for executing the request instruction or not according to the information carried in the request instruction, wherein the method specifically comprises the following steps:
inquiring whether the database object corresponding to the identification information is contained in the first dynamic database subsystem according to the identification information;
when the first dynamic database subsystem contains a database object corresponding to the identification information, determining that the first dynamic database subsystem contains the database object for executing the request instruction;
when the first dynamic database subsystem does not contain the database object corresponding to the identification information, determining that the first dynamic database subsystem does not contain the database object executing the request instruction.
In one possible implementation, the address of the second dynamic database subsystem includes a shared memory base address of the second dynamic database subsystem;
according to the address of the second dynamic database subsystem, a request instruction is sent to the second dynamic database subsystem, and the method specifically comprises the following steps:
and writing a request instruction into a communication area of the second dynamic database subsystem according to the address of the second dynamic database subsystem.
In one possible implementation, after executing the request instruction based on the database object in the second dynamic database subsystem, the method further comprises:
writing a target result of executing the request instruction into a communication area of the first dynamic database subsystem;
the first dynamic database subsystem acquires a target result from the communication area of the first dynamic database subsystem and feeds back the target result to the user.
In one possible implementation, the method further comprises:
and when the address of the second dynamic database subsystem is not queried in the global data dictionary mapping table, returning error information to the user.
In a second aspect, an embodiment of the present application provides a database management system, including a root database subsystem, a control coordination module, a plurality of dynamic database subsystems, and a communication area of the plurality of dynamic database subsystems, where each dynamic database subsystem includes a CPU and a memory module under the same node, where: the root database subsystem is used for being matched with the control coordination module to manage a plurality of dynamic database subsystems; the communication area of the dynamic database subsystem is used for realizing data interaction of different dynamic database subsystems.
In a third aspect, an embodiment of the present application provides a data processing apparatus, where the apparatus is applied to a database management system, where the database management system includes a plurality of dynamic database subsystems, and the dynamic database subsystems include a CPU and a memory module under the same node, and the data processing apparatus includes:
the acquisition module is used for acquiring a request instruction of a user;
the first query module is used for querying whether the database object for executing the request instruction is contained in a first dynamic database subsystem or not according to the information carried in the request instruction, wherein the first dynamic database subsystem is the current dynamic database subsystem;
the second query module is used for querying the address of a second dynamic database subsystem where the database object for executing the request instruction is located from a pre-established global data dictionary mapping table under the condition that the database object for executing the request instruction is not contained in the first dynamic database subsystem, and the second dynamic database subsystem is a dynamic database subsystem different from the first dynamic database subsystem;
the sending module is used for sending a request instruction to the second dynamic database subsystem according to the address of the second dynamic database subsystem;
And the execution module is used for executing the request instruction based on the database object in the second dynamic database subsystem.
In a fourth aspect, an embodiment of the present application provides an electronic device, including:
a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements any of the above methods of processing data.
In a fifth aspect, embodiments of the present application provide a computer storage medium having stored thereon computer program instructions that when executed by a processor implement a data processing method according to any one of the above.
In a sixth aspect, embodiments of the present application provide a computer program product, where instructions in the computer program product, when executed by a processor of an electronic device, enable the electronic device to perform the data processing method of any one of the above.
The data processing method, system, device, equipment and readable storage medium of the embodiment of the application acquire a request instruction of a user; inquiring whether a database object for executing the request instruction is contained in a first dynamic database subsystem or not according to information carried in the request instruction, wherein the first dynamic database subsystem is a current dynamic database subsystem; under the condition that the first dynamic database subsystem does not contain the database object for executing the request instruction, inquiring the address of a second dynamic database subsystem where the database object for executing the request instruction is located from a pre-established global data dictionary mapping table, wherein the second dynamic database subsystem is a dynamic database subsystem different from the first dynamic database subsystem; sending a request instruction to the second dynamic database subsystem according to the address of the second dynamic database subsystem; the request instruction is executed based on the database object in the second dynamic database subsystem. Therefore, each dynamic database subsystem realizes data management by utilizing the central processor and the memory module under the same node, the occurrence of the condition of accessing hardware resources across non-uniform memory access nodes can be avoided as far as possible, and for accessing across non-uniform memory access nodes, the second dynamic database subsystem is queried through the global data dictionary mapping table, so that data can be efficiently transmitted among the dynamic database subsystems, and the access delay possibly triggered by accessing across non-uniform memory access nodes is greatly reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described, and it is possible for a person skilled in the art to obtain other drawings according to these drawings without inventive effort.
FIG. 1 is a flow chart of a data processing method according to one embodiment of the present application;
FIG. 2 is a flow chart of a data processing method according to another embodiment of the present application;
FIG. 3 is a schematic diagram of an initialization flow of a control coordination module system according to another embodiment of the present application;
FIG. 4 is a flowchart of a root database subsystem execution program according to another embodiment of the present application;
FIG. 5 is a flowchart of a database management system according to another embodiment of the present application;
FIG. 6 is a diagram of a database management system architecture for adapting to a non-uniform memory access NUMA architecture provided in accordance with yet another embodiment of the present application;
FIG. 7 is a schematic diagram of a control coordination module according to another embodiment of the present application;
FIG. 8 is a schematic diagram of a shared memory layout of a control coordination module according to another embodiment of the present application;
FIG. 9 is a schematic diagram of a data processing apparatus according to another embodiment of the present application;
Fig. 10 is a schematic structural diagram of an electronic device according to another embodiment of the present application.
Detailed Description
Features and exemplary embodiments of various aspects of the present application are described in detail below to make the objects, technical solutions and advantages of the present application more apparent, and to further describe the present application in conjunction with the accompanying drawings and the detailed embodiments. It should be understood that the specific embodiments described herein are intended to be illustrative of the application and are not intended to be limiting. It will be apparent to one skilled in the art that the present application may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present application by showing examples of the present application.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It should be understood that the term "and/or" as used herein is merely one relationship describing the association of the associated objects, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Accordingly, this application is intended to cover such modifications and variations of this application as fall within the scope of the appended claims (the claims) and their equivalents. The embodiments provided in the examples of the present application may be combined with each other without contradiction.
The existing database management system is generally based on a shared memory mechanism, so that multi-process parallel processing of business logic is realized. Because the process can run in any central processing unit core and can also access the memory in any position, the problem that the central processing unit core accesses the memory across nodes is likely to occur under the condition that the host is of a non-uniform memory access architecture, and then the problem of access delay is caused.
In order to solve the problems in the prior art, embodiments of the present application provide a data processing method, system, device, apparatus, and readable storage medium. The following first describes a data processing method provided in an embodiment of the present application. Fig. 1 is a flow chart of a data processing method according to an embodiment of the present application.
As shown in fig. 1, the data processing method provided in the embodiment of the present application is applied to a database management system, where the database management system includes a plurality of dynamic database subsystems, and the dynamic database subsystems include a CPU and a memory module under the same node.
S110, acquiring a request instruction of a user.
Here, a dynamic database subsystem in the data management system obtains a request instruction of a user.
S120, inquiring whether the database object executing the request instruction is contained in the first dynamic database subsystem according to the information carried in the request instruction, wherein the first dynamic database subsystem is the current dynamic database subsystem.
The first dynamic database subsystem is any one of a plurality of dynamic database subsystems, one dynamic database subsystem is located under one node, the dynamic database subsystem utilizes a CPU and a memory module under the same node to realize data management, and the condition that hardware resources are accessed across Non-uniform memory access (Non-Uniform Memory Access, NUMA) nodes is avoided, wherein the hardware resources comprise a central processing unit (Central Processing Unit, CPU) and the memory module.
In some embodiments, the first dynamic database subsystem is a current dynamic database subsystem, searches a database object executing the request instruction in a database of the current dynamic database subsystem, and determines whether the current dynamic database subsystem contains the database object executing the request instruction.
S130, under the condition that the first dynamic database subsystem does not contain the database object for executing the request instruction, inquiring the address of a second dynamic database subsystem where the database object for executing the request instruction is located from a pre-established global data dictionary mapping table, wherein the second dynamic database subsystem is a dynamic database subsystem different from the first dynamic database subsystem.
In some embodiments, where a database object in the first dynamic database subsystem contains an execution request instruction, the request instruction is executed based on the database object in the first dynamic database subsystem.
In some embodiments, for the case where hardware resources must be accessed across NUMA nodes, the address of a second dynamic database subsystem where the database object executing the request instruction is located is queried through a pre-established global data dictionary mapping table, where the second dynamic database subsystem is a different dynamic database subsystem than the first dynamic database subsystem.
And S140, sending a request instruction to the second dynamic database subsystem according to the address of the second dynamic database subsystem.
Wherein the request instruction is an acquired request instruction of the user, and the second dynamic database subsystem is a dynamic database subsystem containing a database object for executing the request instruction.
S150, executing a request instruction based on the database object in the second dynamic database subsystem.
Here, the second dynamic database subsystem, upon acquiring the request instruction, executes the request instruction based on the database object in the second dynamic database subsystem,
in this way, each dynamic database subsystem realizes data management by using the CPU and the memory module under the same node, so that the situation of accessing hardware resources across NUMA nodes can be avoided as much as possible, and for the access across NUMA nodes, the second dynamic database subsystem is queried through the global data dictionary mapping table, so that data can be efficiently transmitted among the dynamic database subsystems, and the access delay possibly triggered by the access across NUMA nodes is greatly reduced.
Based on this, in some embodiments, the information carried in the request instruction includes identification information of the database object, the identification information including at least one of a name of the database object and an ID of the database object;
Inquiring whether the first dynamic database subsystem contains a database object for executing the request instruction or not according to the information carried in the request instruction, wherein the method specifically comprises the following steps:
inquiring whether the database object corresponding to the identification information is contained in the first dynamic database subsystem according to the identification information;
when the first dynamic database subsystem contains a database object corresponding to the identification information, determining that the first dynamic database subsystem contains the database object for executing the request instruction;
when the first dynamic database subsystem does not contain the database object corresponding to the identification information, determining that the first dynamic database subsystem does not contain the database object executing the request instruction.
Here, the identification information of the database object can uniquely identify the database object, including at least one of a name of the database object and an ID of the database object, and whether the database object corresponding to the identification information is included can be queried from the first dynamic database subsystem through the identification information.
In some embodiments, the database object is searched according to the identification information of the database object, and whether the database object for executing the request instruction is contained in the first dynamic database subsystem is determined.
In this way, the database object can be accurately found according to the identification information, and whether the first dynamic database subsystem contains the database object for executing the request instruction can be determined.
Based on this, in some embodiments, the address of the second dynamic database subsystem includes a shared memory base address of the second dynamic database subsystem;
the step S140 may specifically include:
and writing a request instruction into a communication area of the second dynamic database subsystem according to the address of the second dynamic database subsystem.
Here, the shared memory base address is a communication area head address of the second dynamic database subsystem.
In some embodiments, the request instructions are written to the communication area of the second dynamic database subsystem based on a shared memory base address of an address of the second dynamic database subsystem.
In this way, the request instructions can be more accurately written into the communication area of the second dynamic database subsystem for the second dynamic database subsystem to execute the request instructions.
Based on this, in some embodiments, after S150 described above, the method further includes:
writing a target result of executing the request instruction into a communication area of the first dynamic database subsystem;
the first dynamic database subsystem acquires a target result from the communication area of the first dynamic database subsystem and feeds back the target result to the user.
In some embodiments, after the request instruction is written in the communication area of the second dynamic database subsystem, the second dynamic database subsystem obtains the request instruction from the communication area of the second dynamic database subsystem, executes the request instruction based on the database object in the second dynamic database subsystem, and writes the target result of executing the request instruction in the communication area of the first dynamic database subsystem, the first dynamic database subsystem obtains the target result from the communication area of the first dynamic database subsystem, and feeds back the target result to the user,
in this way, the second dynamic database subsystem executes the request instruction to obtain a result, and the first dynamic database subsystem obtains the result in the second dynamic database subsystem, so that in the case that the hardware resource must be accessed across NUMA nodes, the database object corresponding to the request instruction can be found, and the request instruction is completed.
Based on this, in some embodiments, the method may further comprise:
and when the address of the second dynamic database subsystem is not queried in the global data dictionary mapping table, returning error information to the user.
In this way, the user can know through the error information that the dynamic database subsystem does not contain a database object to execute the request instruction.
Based on this, in some embodiments, the database management system further comprises a control coordination module and a root database subsystem;
as shown in fig. 2, before S110, the method further includes:
s101, a control coordination module writes a configuration file;
s101, initializing according to a configuration file in a database subsystem reading control coordination module.
The configuration file comprises a global shared memory base address, configuration information of a root database subsystem, configuration information of a dynamic database subsystem and a global data dictionary mapping table, wherein the configuration information of the root database subsystem comprises an address of the root database subsystem, an ID of a NUMA node where the root database subsystem is located, an ID of a CPU (Central processing Unit) used, the shared memory base address of the root database subsystem and the shared memory capacity of the root database subsystem, and the configuration information of the dynamic database subsystem comprises an address of the dynamic database subsystem, an ID of the NUMA node where the root database subsystem is located, an ID of the CPU used, the shared memory base address of the dynamic database subsystem and the shared memory capacity of the dynamic database subsystem.
In some embodiments, the global shared memory base is used to determine a starting virtual address of the global shared memory, the global shared memory base includes a root database subsystem shared memory base used to determine the starting virtual address of the root database subsystem shared memory and a dynamic database subsystem shared memory base used to determine the starting virtual address of the dynamic database subsystem shared memory.
In some embodiments, the global data dictionary mapping table is used for determining whether the required database object exists in other dynamic database subsystems by the dynamic database subsystem by retrieving the mapping table when the dynamic database subsystem finds that the required database object does not exist in the own database.
In this way, the root database subsystem is able to read configuration information in the configuration file for initialization.
Based on this, in some embodiments, the S102 may specifically include:
the root database subsystem creates a shared memory segment of the control coordination module and a shared memory segment of the root database subsystem according to the configuration file;
the root database subsystem starts each dynamic database subsystem one by one;
the dynamic database subsystem binds the CPU of the corresponding node, creates a shared memory, and binds the shared memory base address of the dynamic database subsystem;
the dynamic database subsystem registers the database object held by itself into the global data dictionary mapping table.
In some embodiments, the root database subsystem creates shared memory segments that control the coordination module and database subsystem according to the configuration file and individually activates each dynamic database subsystem.
In some embodiments, as shown in FIG. 3, a database manager (DatabaseAdministrator, DBA) writes a control coordination module configuration file, the database manager starts a root database subsystem, reads the configuration file from the root database subsystem, executes a program from the root database subsystem to complete initialization, where CSM is the control coordination module and RDB is the root database subsystem.
As one example, as shown in fig. 4, the root database subsystem execution program includes the steps of:
step 1: the root database subsystem creates a shared memory segment of the control coordination module and a shared memory segment of the root database subsystem according to the configuration file;
step 2: the root database subsystem starts each dynamic database subsystem one by one according to the configuration file;
step 3: each dynamic database subsystem binds the CPU of the corresponding node according to the configuration file, creates a shared memory, and binds the shared memory base address of the dynamic database subsystem;
step 4: each dynamic database subsystem registers the database object held by itself into the global data dictionary mapping table.
In this way, the configuration file in the control coordination module is read and initialized according to the database subsystem, so that a user can conveniently find the dynamic database subsystem where the database object containing the request instruction is located.
In the embodiment provided in the present application, the database management system running program flow is shown in fig. 5, and includes the following steps:
step 1: a certain dynamic database subsystem NDB in the database management system receives a request command of a user;
step 2: searching a database object required by processing a user request command in a database of the current dynamic database subsystem NDB, and judging whether the database object can be searched; if the user command is found, executing the user command, and returning the execution structure to the user; if not, performing the next step, wherein the current dynamic database subsystem is the first dynamic database subsystem;
step 3: searching a required database object in a global data dictionary mapping table in a control coordination module CSM, and judging whether the database object can be searched again; if the data is found, the next step is carried out; if not, the database management system does not have the database object required by the user command, and error information is returned to the user;
step 4: obtaining NDB_ID information of a target dynamic database subsystem from a global data dictionary mapping table in a control coordination module CSM, wherein the target dynamic database subsystem is a second dynamic database subsystem, and the NDB_ID is an address of the second dynamic database subsystem;
Step 5: the current dynamic database subsystem NDB is based on the shared memory base address of the target dynamic database subsystem NDB_ID information (namely the target dynamic database subsystem NDB_communication area head address);
step 6: the current dynamic database subsystem NDB writes a request command for acquiring a required data object into the NDB_communication area of the target dynamic database subsystem NBD according to the NDB_communication area head address of the target dynamic database subsystem NBD;
step 7: the target dynamic database subsystem NDB acquires the request command of the required database object, executes the request command, and writes the request command of the required database object into an NDB_communication area of the current dynamic database subsystem NDB;
step 8: and the target dynamic database subsystem NDB acquires the database object required by processing the user command, executes the user command and returns the command result to the user.
The embodiment of the application provides a database management system, which comprises a root database subsystem, a control coordination module, a plurality of dynamic database subsystems and communication areas of the dynamic database subsystems, wherein each dynamic database subsystem comprises a CPU and a memory module under the same node, and the CPU and the memory module are connected with each other through the communication areas of the dynamic database subsystems, wherein:
the root database subsystem is used for being matched with the control coordination module to manage a plurality of dynamic database subsystems;
The communication area of the dynamic database subsystem is used for realizing data interaction of different dynamic database subsystems.
In some embodiments, the root database subsystem is responsible for coordinating and managing each dynamic database subsystem, and cooperates with the control coordination module to realize management of each dynamic database subsystem, where the root database subsystem can use hardware resources under any NUMA node, where the hardware resources include a CPU and a memory module.
In some embodiments, the dynamic database subsystem is responsible for processing user traffic in response to a user's request instruction, the hardware resources used by the dynamic database subsystem being subordinate to the same NUMA node; if not necessary, the dynamic database subsystem does not access the hardware resources under other NUMA nodes, and the user configures the corresponding number of the dynamic database subsystems according to the configuration status of the hardware resources and the service requirements, and the number of the dynamic database subsystems can be increased or decreased according to the service scene.
In some embodiments, the communication area of the dynamic database subsystem shares memory header space for the dynamic database subsystem for receiving commands sent by the root database subsystem or other dynamic database subsystems and returning command execution results.
In some embodiments, the control coordination module is used to record global management information, and the control coordination module is used by the root database subsystem, depending on user settings, may reside in shared memory under any NUMA node.
As one example, FIG. 6 is a diagram of a database management system architecture that accommodates the NUMA architecture, as shown in FIG. 6, the database management system includes 4 dynamic database subsystems, where NDB-1, NDB-2, NDB-3, NDB-4 are 4 dynamic database subsystems. The control coordination module CMS is matched with the root database subsystem RDB based on the configuration information to manage a plurality of dynamic database subsystems, and the control coordination module CMS queries the address of the dynamic database subsystem where the database object executing the request instruction is located according to the global data dictionary information from a pre-established global data dictionary mapping table. Each dynamic database subsystem binds the CPU of the corresponding node according to the configuration file and creates a Memory Region of the shared Memory module. The dynamic database subsystem on each NUMA node is used for distributing and arranging the database management system, so that the data processing can be concentrated in a certain NUMA node to the greatest extent, and the condition of accessing hardware resources across NUMA nodes is avoided as much as possible, and compared with the traditional database management system, the condition of accessing across NUMA nodes can be effectively eliminated.
In some embodiments, users are able to flexibly and efficiently deploy a database management system on top of NUMA nodes depending on their own needs and hardware configuration conditions.
In another example, fig. 7 is a schematic diagram of a control coordination module CSM, as shown in fig. 7, where the control coordination module CSM includes a global shared memory base address, root database subsystem RDB configuration information, dynamic database subsystem NDB configuration information, and a global data dictionary mapping table, and NDB-1, NDB-2, NDB-3, NDB-4 are 4 dynamic database subsystems, and the global data dictionary mapping table includes names of database objects and IDs of database objects.
In another example, FIG. 8 is a schematic diagram of a control orchestration module shared memory layout, showing the control orchestration module shared memory layout. The global shared memory base address is used for determining a starting virtual address of the global shared memory, the global shared memory base address comprises a root database subsystem shared memory base address and a dynamic database subsystem shared memory base address, the root database subsystem shared memory base address is used for determining the starting virtual address of the root database subsystem shared memory, and the dynamic database subsystem shared memory base address is used for determining the starting virtual address of the dynamic database subsystem shared memory. The starting virtual address of the global shared memory is a low address, and the ending virtual address is a high address.
Based on the data processing method provided by the above embodiment, correspondingly, the application further provides a specific implementation mode of the data processing device. Please refer to the following examples.
Referring first to fig. 9, an embodiment of the present application provides a data processing apparatus 300, where the apparatus is applied to a database management system, where the database management system includes a plurality of dynamic database subsystems, and the dynamic database subsystems include a CPU and a memory module under the same node, and the apparatus 300 includes:
an obtaining module 310, configured to obtain a request instruction of a user;
the first query module 320 is configured to query, according to information carried in the request instruction, whether a database object for executing the request instruction is included in a first dynamic database subsystem, where the first dynamic database subsystem is a current dynamic database subsystem;
the second query module 330 is configured to query, in a case that the first dynamic database subsystem does not include a database object for executing the request instruction, an address of a second dynamic database subsystem where the database object for executing the request instruction is located from a pre-established global data dictionary mapping table, where the second dynamic database subsystem is a dynamic database subsystem different from the first dynamic database subsystem;
A sending module 340, configured to send a request instruction to the second dynamic database subsystem according to the address of the second dynamic database subsystem;
an execution module 350, configured to execute the request instruction based on the database object in the second dynamic database subsystem.
Based on this, in some embodiments, the database management system further comprises a control coordination module and a root database subsystem; the apparatus 300 may further include:
the writing module is used for controlling the coordination module to write the configuration file before acquiring the request instruction of the user;
and the initialization module is used for initializing the configuration file in the root database subsystem reading control coordination module.
Based on this, in some embodiments, the initialization module may specifically include:
the creation unit is used for creating the shared memory section of the control coordination module and the shared memory section of the root database subsystem according to the configuration file;
the starting unit is used for starting each dynamic database subsystem one by the root database subsystem;
the binding unit is used for binding the CPU of the corresponding node by the dynamic database subsystem, creating a shared memory and binding the shared memory base address of the dynamic database subsystem;
And the registration unit is used for registering the database object held by the dynamic database subsystem into the global data dictionary mapping table.
Based on this, in some embodiments, the information carried in the request instruction includes identification information of the database object, the identification information including at least one of a name of the database object and an ID of the database object;
the first query module 320 may specifically include:
the inquiring unit is used for inquiring whether the database object corresponding to the identification information is contained in the first dynamic database subsystem according to the identification information;
the determining unit is used for determining that the first dynamic database subsystem contains the database object for executing the request instruction when the first dynamic database subsystem contains the database object corresponding to the identification information;
and the determining unit is also used for determining that the first dynamic database subsystem does not contain the database object for executing the request instruction when the first dynamic database subsystem does not contain the database object corresponding to the identification information.
Based on this, in some embodiments, the address of the second dynamic database subsystem includes a shared memory base address of the second dynamic database subsystem;
The sending module 340 may specifically include:
and the request instruction writing unit is used for writing a request instruction into the communication area of the second dynamic database subsystem according to the address of the second dynamic database subsystem.
Based on this, in some embodiments, the apparatus 300 may further include:
the writing module is used for writing a target result of executing the request instruction into a communication area of the first dynamic database subsystem after executing the request instruction based on the database object in the second dynamic database subsystem;
and the result acquisition module is used for acquiring a target result from the communication area of the first dynamic database subsystem by the first dynamic database subsystem and feeding back the target result to the user.
Based on this, in some embodiments, the apparatus 300 may further include:
and the information return module is used for returning error information to the user when the address of the second dynamic database subsystem is not queried in the global data dictionary mapping table.
The modules of the data processing apparatus provided in the embodiments of the present application may implement the functions of each step of the data processing method provided in fig. 1 and fig. 2, and may achieve the corresponding technical effects, which are not described herein for brevity.
Based on the same inventive concept, the embodiment of the application also provides electronic equipment.
Fig. 10 shows a schematic hardware structure of an electronic device according to an embodiment of the present application.
A processor 1001 and a memory 1002 storing computer program instructions may be included in an electronic device.
In particular, the processor 1001 described above may include a central processing unit (Central Processing Unit, CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured to implement one or more integrated circuits of embodiments of the present application.
Memory 1002 may include mass storage for data or instructions. By way of example, and not limitation, memory 1002 may include a Hard Disk Drive (HDD), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, magnetic tape, or universal serial bus (Universal Serial Bus, USB) Drive, or a combination of two or more of the foregoing. The memory 1002 may include removable or non-removable (or fixed) media, where appropriate. Memory 1002 may be internal or external to the integrated gateway disaster recovery device, where appropriate. In a particular embodiment, the memory 1002 is a non-volatile solid state memory.
The Memory may include Read Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk storage media devices, optical storage media devices, flash Memory devices, electrical, optical, or other physical/tangible Memory storage devices. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software comprising computer-executable instructions and when the software is executed (e.g., by one or more processors) it is operable to perform the operations described with reference to methods in accordance with aspects of the present disclosure.
The processor 1001 implements any of the data processing methods of the above embodiments by reading and executing computer program instructions stored in the memory 1002.
In one example, the electronic device may also include a communication interface 1003 and a bus 1010. As shown in fig. 10, the processor 1001, the memory 1002, and the communication interface 1003 are connected to each other by a bus 1010, and perform communication with each other.
The communication interface 1003 is mainly used for implementing communication among the modules, devices, units and/or apparatuses in the embodiments of the present application.
Bus 1010 includes hardware, software, or both, coupling components of an electronic device to each other. By way of example, and not limitation, the buses may include an accelerated graphics port (Accelerated Graphics Port, AGP) or other graphics Bus, an enhanced industry standard architecture (Extended Industry Standard Architecture, EISA) Bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an industry standard architecture (Industry Standard Architecture, ISA) Bus, an Infiniband interconnect, a low pin count (Linear Predictive Coding, LPC) Bus, a memory Bus, a micro channel architecture (MicroChannel Architecture, MCa) Bus, a peripheral component interconnect (Peripheral Component Interconnect, PCI) Bus, a PCI-Express (Peripheral Component Interconnect-X, PCI-X) Bus, a serial advanced technology attachment (Serial Advanced Technology Attachment, SATA) Bus, a video electronics standards association Local Bus (VLB) Bus, or other suitable Bus, or a combination of two or more of these. Bus 1010 may include one or more buses, where appropriate. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect. The electronic device may execute the data processing method in the embodiment of the present invention, thereby implementing the data processing method described in fig. 1 and fig. 2.
In addition, in combination with the data processing method in the above embodiment, the embodiment of the application may be implemented by providing a computer storage medium. The computer storage medium has stored thereon computer program instructions; which when executed by a processor, implement any of the data processing methods of the above embodiments.
The present application also provides a computer program product, instructions in which, when executed by a processor of an electronic device, cause the electronic device to perform various processes for implementing any of the data processing method embodiments described above.
It should be clear that the present application is not limited to the particular arrangements and processes described above and illustrated in the drawings. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present application are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications, and additions, or change the order between steps, after appreciating the spirit of the present application.
The functional blocks shown in the above-described structural block diagrams may be implemented in hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), suitable firmware, a plug-in, a function card, or the like. When implemented in software, the elements of the present application are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine readable medium or transmitted over transmission media or communication links by a data signal carried in a carrier wave. A "machine-readable medium" may include any medium that can store or transfer information. Examples of machine-readable media include electronic circuitry, semiconductor Memory devices, read-Only Memory (ROM), flash Memory, erasable Read-Only Memory (Erasable Read Only Memory, EROM), floppy disks, compact discs (Compact Disc Read-Only Memory, CD-ROM), optical disks, hard disks, fiber optic media, radio Frequency (RF) links, and the like. The code segments may be downloaded via computer networks such as the internet, intranets, etc.
It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be different from the order in the embodiments, or several steps may be performed simultaneously.
Aspects of the present disclosure are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions/acts specified in the flowchart and/or block diagram block or blocks. Such a processor may be, but is not limited to being, a general purpose processor, a special purpose processor, an application specific processor, or a field programmable logic circuit. It will also be understood that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware which performs the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In the foregoing, only the specific embodiments of the present application are described, and it will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the systems, modules and units described above may refer to the corresponding processes in the foregoing method embodiments, which are not repeated herein. It should be understood that the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present application, which are intended to be included in the scope of the present application.

Claims (11)

1. A data processing method, wherein the method is applied to a database management system, the database management system comprising a plurality of dynamic database subsystems, the dynamic database subsystems comprising a CPU and a memory module at the same node, the method comprising:
acquiring a request instruction of a user;
inquiring whether a database object for executing the request instruction is contained in a first dynamic database subsystem or not according to information carried in the request instruction, wherein the first dynamic database subsystem is the current dynamic database subsystem;
Under the condition that the first dynamic database subsystem does not contain the database object for executing the request instruction, inquiring the address of a second dynamic database subsystem where the database object for executing the request instruction is located from a pre-established global data dictionary mapping table, wherein the second dynamic database subsystem is different from the first dynamic database subsystem;
sending the request instruction to the second dynamic database subsystem according to the address of the second dynamic database subsystem;
executing the request instruction based on the database object in the second dynamic database subsystem.
2. The method of claim 1, wherein the database management system further comprises a control coordination module and a root database subsystem;
before the acquiring the request instruction of the user, the method further comprises:
the control coordination module writes a configuration file;
and the root database subsystem reads the configuration file in the control coordination module for initialization.
3. The method according to claim 2, wherein the root database subsystem reads the configuration file in the control coordination module for initialization, and specifically comprises:
The root database subsystem creates a shared memory segment of the control coordination module and a shared memory segment of the root database subsystem according to the configuration file;
the root database subsystem starts each dynamic database subsystem one by one;
the dynamic database subsystem binds the CPU of the corresponding node, creates a shared memory, and binds the shared memory base address of the dynamic database subsystem;
the dynamic database subsystem registers the database object held by the dynamic database subsystem into the global data dictionary mapping table.
4. The method of claim 1, wherein the information carried in the request instruction includes identification information of the database object, the identification information including at least one of a name of the database object and an ID of the database object;
inquiring whether the first dynamic database subsystem contains a database object for executing the request instruction or not according to the information carried in the request instruction, wherein the method specifically comprises the following steps:
inquiring whether a database object corresponding to the identification information is contained in the first dynamic database subsystem or not according to the identification information;
When the first dynamic database subsystem contains the database object corresponding to the identification information, determining that the first dynamic database subsystem contains the database object for executing the request instruction;
and when the first dynamic database subsystem does not contain the database object corresponding to the identification information, determining that the first dynamic database subsystem does not contain the database object for executing the request instruction.
5. The method of claim 1, wherein the address of the second dynamic database subsystem comprises a shared memory base address of the second dynamic database subsystem;
the sending the request instruction to the second dynamic database subsystem according to the address of the second dynamic database subsystem specifically includes:
and writing the request instruction into a communication area of the second dynamic database subsystem according to the address of the second dynamic database subsystem.
6. The method of claim 5, wherein after said executing said request instruction based on said database object in said second dynamic database subsystem, said method further comprises:
Writing a target result of executing the request instruction into a communication area of the first dynamic database subsystem;
the first dynamic database subsystem acquires the target result from the communication area of the first dynamic database subsystem and feeds the target result back to a user.
7. The method according to claim 1, wherein the method further comprises:
and when the address of the second dynamic database subsystem is not queried in the global data dictionary mapping table, returning error information to a user.
8. The database management system is characterized by comprising a root database subsystem, a control coordination module, a plurality of dynamic database subsystems and a plurality of communication areas of the dynamic database subsystems, wherein each dynamic database subsystem comprises a CPU and a memory module under the same node, and the CPU and the memory module are connected with each other through the communication areas of the dynamic database subsystems, wherein:
the root database subsystem is used for being matched with the control coordination module to manage the plurality of dynamic database subsystems;
the communication area of the dynamic database subsystem is used for realizing data interaction of different dynamic database subsystems.
9. A data processing apparatus, the apparatus being applied to a database management system, the database management system comprising a plurality of dynamic database subsystems, the dynamic database subsystems comprising a CPU and a memory module at a same node, the apparatus comprising:
The acquisition module is used for acquiring a request instruction of a user;
the first query module is used for querying whether a database object for executing the request instruction is contained in a first dynamic database subsystem or not according to the information carried in the request instruction, wherein the first dynamic database subsystem is the current dynamic database subsystem;
the second query module is used for querying the address of a second dynamic database subsystem where the database object executing the request instruction is located from a pre-established global data dictionary mapping table under the condition that the first dynamic database subsystem does not contain the database object executing the request instruction, wherein the second dynamic database subsystem is the dynamic database subsystem different from the first dynamic database subsystem;
the sending module is used for sending the request instruction to the second dynamic database subsystem according to the address of the second dynamic database subsystem;
and the execution module is used for executing the request instruction based on the database object in the second dynamic database subsystem.
10. An electronic device, the electronic device comprising: a processor, a memory and a computer program stored on the memory and executable on the processor, which when executed by the processor performs the steps of the data processing method according to any one of claims 1 to 7.
11. A computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the steps of the data processing method according to any of claims 1 to 7.
CN202211674977.2A 2022-12-26 2022-12-26 Data processing method, system, device, equipment and readable storage medium Pending CN116049176A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211674977.2A CN116049176A (en) 2022-12-26 2022-12-26 Data processing method, system, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211674977.2A CN116049176A (en) 2022-12-26 2022-12-26 Data processing method, system, device, equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN116049176A true CN116049176A (en) 2023-05-02

Family

ID=86112502

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211674977.2A Pending CN116049176A (en) 2022-12-26 2022-12-26 Data processing method, system, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN116049176A (en)

Similar Documents

Publication Publication Date Title
US11550819B2 (en) Synchronization cache seeding
CN106648440B (en) Control method for operating storage device and storage device
US9514170B1 (en) Priority queue using two differently-indexed single-index tables
CN109213691B (en) Method and apparatus for cache management
CN111737564B (en) Information query method, device, equipment and medium
CN115357540B (en) Storage system, calculation storage processor thereof, solid hard disk and data reading and writing method
CN107203480B (en) Data prefetching method and device
CN109347899B (en) Method for writing log data in distributed storage system
CN111694992A (en) Data processing method and device
CN116049176A (en) Data processing method, system, device, equipment and readable storage medium
CN116303126A (en) Caching method, data processing method and electronic equipment
WO2022002128A1 (en) Data reading method, data writing method, device, and system
CN111737223B (en) File copying method, device, equipment and storage medium
CN107679093B (en) Data query method and device
CN112947863A (en) Method for combining storage spaces under Feiteng server platform
CN110019448B (en) Data interaction method and device
CN111177478A (en) Query method, device and system
CN111369282A (en) Resource processing method and device
CN116303125B (en) Request scheduling method, cache, device, computer equipment and storage medium
CN108292264B (en) Method for managing the availability of memory pages and memory availability management module
CN115103020B (en) Data migration processing method and device
US20100217930A1 (en) Managing processing systems access to control blocks providing information on storage resources
CN114296639B (en) Command processing method and flash memory device
US11822797B1 (en) Object computational storage system, data processing method, client and storage medium
CN109388646B (en) Data processing method and device

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