Optimization device, optimization method, and optimization program
Patent Information
- Application Number
- JP2025530812
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Filing Date
- 2023-07-03
- Publication Date
- 2025-01-09
AI Technical Summary
Conventional technologies fail to optimize data distribution between relational databases (RDBs) and graph databases (GBDs), leading to suboptimal performance in applications that require high-speed data referencing and response to data tampering.
An optimization device that acquires and processes data across RDB and GBD areas, measures access times, calculates total access times for different data arrangements, and selects the optimal placement area to minimize access time, thereby optimizing data distribution and speeding up application performance.
The optimization device effectively optimizes data distribution between RDBs and GBDs, enhancing application speed by identifying the most efficient data placement strategy across different database areas, improving overall performance.
Abstract
Description
Optimization device, optimization method, and optimization program
[0001] The present invention relates to an optimization device, an optimization method, and an optimization program.
[0002] In the development of information systems, it is necessary to be able to quickly access databases using applications and to respond to data tampering. Therefore, in recent years, in addition to conventional relational databases (RDBs), graph databases (graph DBs), which can output and display interconnections between data at higher speeds, have been attracting attention as a data reference source. However, since graph DBs are specialized for displaying graphics and cannot replace RDBs, which are capable of function processing, statistical processing, and report output, technology has been proposed that uses RDBs and graph DBs in parallel (see Patent Document 1 and Non-Patent Document 1).
[0003] Japanese Patent Application Laid-Open No. 2014-229276
[0004] Masashi Sugimoto and three others, "Proposal of a method for building a hybrid system using relational and graph databases," IEICE Technical Report, ICM2021-44, Institute of Electronics, Information and Communication Engineers, March 3, 2022, pp. 12-17
[0005] However, conventional technologies do not necessarily optimize data flow between RDBs and graph DBs and applications, making it difficult to speed up applications. For example, the technology in Non-Patent Document 1 is a technology that attempts to align data between RDBs and graph DBs in real time, but does not take into account data flow from the two databases to applications. Furthermore, the technology in Patent Document 1 is limited to data searches and does not consider how to design RDBs and graph DBs. Therefore, it is difficult to optimize data flow between databases and applications and speed up applications using conventional technologies.
[0006] The present invention has been made in consideration of the above, and aims to optimize data flow between a database and an application in a database in which an RDB and a graph DB coexist, thereby speeding up the application.
[0007] In order to solve the above-mentioned problems and achieve the object, the optimization device of the present invention is characterized by having an acquisition unit that acquires data to be processed by a specified application, a placement unit that places attribute values of the data in each of a relational database area of a memory unit, a node area of a graph database, and an area of relationships between nodes of the graph database, a measurement unit that measures the time required for the application to access each of the attribute values placed in each of the areas, a calculation unit that uses the measured time required for access to each of the attribute values to calculate the total time required for the application to access each attribute value in a combination of all different attribute values in the placed areas, and a selection unit that selects the area in which each attribute value is placed when the calculated total time required for access by the application is the shortest.
[0008] According to the present invention, in a database in which an RDB and a graph DB coexist, data flow between the database and an application can be optimized, thereby speeding up the application.
[0009] Fig. 1 is a diagram for explaining an overview of an optimization device. Fig. 2 is a schematic diagram illustrating an example of the general configuration of an optimization device. Fig. 3 is a flowchart showing an optimization processing procedure. Fig. 4 is a diagram illustrating an example of a computer that executes an optimization program.
[0010] Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings. Note that the present invention is not limited to this embodiment. In addition, in the description of the drawings, the same parts are designated by the same reference numerals.
[0011] [Overview of the Optimization Device] Fig. 1 is a diagram for explaining an overview of the optimization device. Conventionally, data referenced by an application is stored in the reference system area of a database. For example, in a database in which an RDB and a graph DB coexist, of the master data originally placed in the RDB, data for displaying graphs is placed in the reference system area of the graph DB, and the other data for reports and tables is placed directly in the reference system of the RDB.
[0012] Here, there are three types of data that can be placed in a database where an RDB and a graph DB coexist: a form in which attribute values are placed in columns, as with master data; a form in which attribute values of nodes are placed; and a form in which attribute values of relationships between nodes are placed.
[0013] Conventionally, depending on the form of data, as illustrated in FIG. 1(a), the attribute values of data are arranged in columns in the area of the RDB reference system 14a (see (1)), the attribute values of nodes (see (2)) are arranged in the area of the graph DB node reference system 14b, and the attribute values of relationships between nodes (see (3)) are arranged in the area of the graph DB relationship reference system 14c.
[0014] An application that displays a graph references the attribute values of the nodes in the graph DB node reference system 14b and the attribute values of the relationships between the nodes in the graph DB relationship reference system 14c (see (5)). An application that displays data in a table or form references the attribute values of the columns in the RDB reference system 14a (see (6)).
[0015] On the other hand, data placement based solely on the data format as described above does not necessarily result in faster application performance. For example, even data placed in a graph DB may be processed faster if it remains placed in an RDB.
[0016] Therefore, the optimization device 10 of this embodiment shown in Fig. 1(b) speculatively executes an application and determines the data placement and the data reference source area so that the application can run at the fastest speed. In this way, the optimization device 10 realizes the optimization of data flow between the database and the application based on performance.
[0017] [Configuration of the Optimization Apparatus] Fig. 2 is a schematic diagram illustrating the general configuration of the optimization apparatus. As illustrated in Fig. 2, the optimization apparatus 10 is realized by a general-purpose computer such as a personal computer, and includes an input unit 11, an output unit 12, a communication control unit 13, a storage unit 14, and a control unit 15.
[0018] The input unit 11 is realized by input devices such as a keyboard and a mouse, and inputs various instruction information such as a command to start processing to the control unit 15 in response to input operations by an operator. The output unit 12 is realized by a display device such as a liquid crystal display, a printing device such as a printer, or the like.
[0019] The communication control unit 13 is realized by a NIC (Network Interface Card) or the like, and controls communication between an external device such as a server via a network and the control unit 15. For example, the communication control unit 13 controls communication between the control unit 15 and a database device of another system that manages data that is the target of optimization processing, which will be described later, or a user terminal on which an application is installed.
[0020] The storage unit 14 is realized by a semiconductor memory element such as a RAM (Random Access Memory) or a flash memory, or a storage device such as a hard disk or an optical disk. The storage unit 14 stores in advance the processing program that operates the optimization device 10 and data used during execution of the processing program, or temporarily stores the data each time processing is performed. The storage unit 14 may be configured to communicate with the control unit 15 via the communication control unit 13.
[0021] In this embodiment, the storage unit 14 stores an RDB reference system 14a, a graph DB node reference system 14b, and a graph DB relationship reference system 14c that are generated in an optimization process described later, and these are used as databases by applications.
[0022] The control unit 15 is realized using a CPU (Central Processing Unit) or the like, and executes a processing program stored in memory. As a result, the control unit 15 functions as an acquisition unit 15a, an arrangement unit 15b, a measurement unit 15c, a calculation unit 15d, and a selection unit 15e, as illustrated in FIG. 2, to perform optimization processing. Note that these functional units may be implemented individually or in part on different hardware. For example, the acquisition unit 15a may be implemented on a device separate from the other functional units. The control unit 15 may also include other functional units.
[0023] The acquisition unit 15a acquires data to be processed by a predetermined application. For example, the acquisition unit 15a acquires data of an application to be subjected to optimization processing (described later) from a database of another system via the input unit 11 or the communication control unit 13. Specifically, the acquisition unit 15a replicates the database of the other system by snapshot. The acquisition unit 15a may also store the acquired data in the storage unit 14 as master data or initial data. The acquisition unit 15a may also transfer the data to the arrangement unit 15b (described later) without storing it in the storage unit 14.
[0024] The data to be processed may be, for example, data relating to communication facilities. In particular, optimization processing is effective for data relating to cables, such as the manufacturing date and usage of the cables.
[0025] The placement unit 15b places the attribute values of the data in each of the relational database area, the graph database node area, and the graph database inter-node relationship area of the storage unit 14. Specifically, the placement unit 15b places all attribute values of the data to be processed in each of the RDB reference system 14a, the graph DB node reference system 14b, and the graph DB relationship reference system 14c, regardless of the form of each attribute value. In other words, the same attribute value is placed in each of the three areas.
[0026] The measurement unit 15c measures the time required for an application to access each attribute value located in each area. Specifically, the measurement unit 15c measures three access times required for the application to access the attribute value located in three areas: the RDB reference system 14a, the graph DB node reference system 14b, and the graph DB relationship reference system 14c. In other words, the measurement unit 15c measures three times the access time as the number of types of attribute values.
[0027] The calculation unit 15d uses the time required to access each of the measured attribute values to calculate the total time required for the application to access each attribute value in all combinations of different attribute values in the arranged areas. In other words, the calculation unit 15d calculates the total time required for accessing all types of attribute values to be processed by the application (total access time).
[0028] In this case, the calculation unit 15d selects, for each attribute value, an attribute value that is located in one of the three areas and calculates the total time required to access each attribute value. Therefore, the number of combinations of areas in which each attribute value is located is the number of types of attribute values multiplied by the number of areas, i.e., the cube of the number of types of attribute values.
[0029] That is, the calculation unit 15d speculatively calculates the total access time to all attribute values by the application for each of the cubed combinations of (the number of types of attribute values).
[0030] The calculation unit 15d may also weight the attribute values according to the amount of data flowing between the application and the database, and calculate the total time required to access each attribute value for all combinations of attribute values with different layout areas. For example, weighting may be performed according to the length (amount of data) of each attribute value in the specifications. Alternatively, weighting may be performed according to the number of times each attribute value is accessed by the application. In this way, the calculation unit 15d calculates the total access time by the application, taking into account the amount of data flowing between the database and the application.
[0031] The selection unit 15e selects an area in which each attribute value is allocated when the calculated time required for access by the application is shortest. Specifically, the selection unit 15e identifies an allocation area for each attribute value when the total access time calculated by the calculation unit 15d is shortest, and selects the allocation area as the optimal data allocation for each attribute value. This optimizes the amount of data flow between the application and the database. As a result, the application can be accelerated.
[0032] If the data to be processed is data related to communication facilities, as a result of the optimization process, the attribute values of the point facilities and the nodes that include the point facilities are not limited to the graph DB node reference system 14b but are optimized and arranged. Also, the attribute values of the spans and the relationships that include the spans are not limited to the graph DB relationship reference system 14c but are optimized and arranged.
[0033] The optimization device 10 can also be applied to a system that displays data from a graph DB as a line diagram, such as a GIS (Geographic Information System).
[0034] [Optimization Processing] Next, the optimization processing performed by the optimization device 10 according to this embodiment will be described with reference to Fig. 3. Fig. 3 is a flowchart showing the procedure of the optimization processing. The flowchart in Fig. 3 starts, for example, when an operation input is made to instruct the start of the optimization processing.
[0035] First, the acquisition unit 15a acquires data to be processed by a predetermined application (step S1). For example, the acquisition unit 15a acquires data of the application to be optimized from a database of another system.
[0036] In addition, the placement unit 15b places all attribute values of the data to be processed into three areas: the RDB reference system 14a, the graph DB node reference system 14b, and the graph DB relationship reference system 14c, regardless of the form of the attribute values (step S2).
[0037] Next, the measurement unit 15c measures the time required for the application to access each of the attribute values arranged in each of the three areas (step S3).
[0038] Furthermore, the calculation unit 15d uses the time required to access each of the measured attribute values to calculate the total access time by the application to each attribute value in the combination of all the different attribute values in the arranged area (step S4).
[0039] In this case, the calculation unit 15d may further weight the data according to the amount of data flowing between the application and the database, and calculate the total time required to access all combinations of different attribute values in the allocated areas. For example, the calculation unit 15d may weight the data according to the length (amount of data) of each attribute value in the specifications. Alternatively, the calculation unit 15d may weight the data according to the number of times each attribute value is accessed by the application.
[0040] The selection unit 15e then selects an area in which each attribute value is allocated when the calculated total access time by the application is the shortest (step S5). Specifically, the selection unit 15e identifies an allocation area for each attribute value when the total access time calculated by the calculation unit 15d is the shortest, and selects the allocation area as the optimal data allocation for each attribute value. This completes the series of optimization processes.
[0041] [Effects] As described above, in the optimization device 10, the acquisition unit 15a acquires data to be processed by a predetermined application. The allocation unit 15b allocates attribute values of the data to each of the relational database area, the graph database node area, and the graph database node relationship area in the storage unit 14. The measurement unit 15c measures the time required for the application to access each of the attribute values allocated in each of the areas. The calculation unit 15d uses the measured time required for access to each attribute value to calculate the total time required for the application to access each attribute value in all combinations of different attribute values in the allocated areas. The selection unit 15e selects the area into which each attribute value is allocated if the calculated total time required for application access is the shortest.
[0042] Specifically, the data to be processed may be data relating to communication facilities, and may also be data relating to cables among communication facilities.
[0043] In this way, the optimization device 10 speculatively calculates the total access time to different attribute values of all types of allocation areas processed by the application, and identifies the data allocation that results in the shortest time as the optimal data allocation. This optimizes the amount of data flow between the application and the database, making it possible to speed up the application.
[0044] Furthermore, the calculation unit 15d further weights the amount of data flowing between the application and the storage unit 14, and calculates the total time required for the application to access each attribute value in all combinations of attribute values with different layout areas. This makes it possible to calculate the total access time by the application, taking into account the amount of data flowing between the database and the application. This further optimizes the amount of data flowing between the application and the database, enabling faster application speeds.
[0045] [Program] A program describing the processing performed by the optimization device 10 according to the above embodiment in a computer-executable language can also be created. In one embodiment, the optimization device 10 can be implemented by installing an optimization program that executes the above optimization processing as package software or online software on a desired computer. For example, by having an information processing device execute the optimization program, the information processing device can function as the optimization device 10. Other examples of information processing devices include mobile communication terminals such as smartphones, mobile phones, and PHS (Personal Handyphone Systems), as well as slate terminals such as PDAs (Personal Digital Assistants). The functions of the optimization device 10 may also be implemented on a cloud server.
[0046] 4 is a diagram showing an example of a computer that executes an optimization program. The computer 1000 includes, for example, a memory 1010, a CPU 1020, a hard disk drive interface 1030, a disk drive interface 1040, a serial port interface 1050, a video adapter 1060, and a network interface 1070. These components are connected by a bus 1080.
[0047] The memory 1010 includes a ROM (Read Only Memory) 1011 and a RAM 1012. The ROM 1011 stores a boot program such as a BIOS (Basic Input Output System). The hard disk drive interface 1030 is connected to a hard disk drive 1031. The disk drive interface 1040 is connected to a disk drive 1041. A removable storage medium such as a magnetic disk or optical disk is inserted into the disk drive 1041. The serial port interface 1050 is connected to a mouse 1051 and a keyboard 1052, for example. The video adapter 1060 is connected to a display 1061, for example.
[0048] Here, the hard disk drive 1031 stores, for example, an OS (Operating System) 1091, an application program 1092, a program module 1093, and program data 1094. The various pieces of information described in the above embodiments are stored in the hard disk drive 1031 or the memory 1010, for example.
[0049] The optimization program is stored in the hard disk drive 1031 as a program module 1093 in which instructions to be executed by the computer 1000 are written. Specifically, the program module 1093 in which each process executed by the optimization device 10 described in the above embodiment is written is stored in the hard disk drive 1031.
[0050] Furthermore, data used for information processing by the optimization program is stored as program data 1094, for example, in the hard disk drive 1031. Then, the CPU 1020 reads the program module 1093 and the program data 1094 stored in the hard disk drive 1031 into the RAM 1012 as necessary, and executes each of the above-described procedures.
[0051] The program module 1093 and program data 1094 related to the optimization program are not limited to being stored in the hard disk drive 1031, and may be stored in, for example, a removable storage medium and read by the CPU 1020 via the disk drive 1041. Alternatively, the program module 1093 and program data 1094 related to the optimization program may be stored in another computer connected via a network such as a LAN (Local Area Network) or a WAN (Wide Area Network), and read by the CPU 1020 via the network interface 1070.
[0052] Although the present invention has been described above as an embodiment, the present invention is not limited to the description and drawings that form part of the disclosure of the present invention. In other words, other embodiments, examples, and operational techniques that can be made by those skilled in the art based on the present invention are all included in the scope of the present invention.
[0053] REFERENCE SIGNS LIST 10 Optimization device 11 Input unit 12 Output unit 13 Communication control unit 14 Storage unit 14a RDB reference system 14b Graph DB node reference system 14c Graph DB relationship reference system 15 Control unit 15a Acquisition unit 15b Placement unit 15c Measurement unit 15d Calculation unit 15e Selection unit
Claims
1. An optimization device comprising: an acquisition unit that acquires data to be processed by a specified application; a placement unit that places attribute values of the data in each of a relational database area of a memory unit, a node area of a graph database, and an area of relationships between nodes of the graph database; a measurement unit that measures the time required for the application to access each of the attribute values placed in each of the areas; a calculation unit that uses the measured time required for accessing each of the attribute values to calculate a total of the time required for the application to access each attribute value in a combination of all different attribute values in the placed areas; and a selection unit that selects an area in which each attribute value is placed when the calculated total of the time required for access by the application is the shortest.
2. The optimization device according to claim 1, characterized in that the calculation unit further calculates the total time required for the access by weighting according to the amount of data flow between the application and the memory unit.
3. The optimization device according to claim 1, wherein the data to be processed is data relating to communication facilities.
4. The optimization device according to claim 3, wherein the data to be processed is data relating to cables.
5. An optimization method executed by an optimization device having a memory unit, comprising: an acquisition step of acquiring data to be processed by a specified application; an arrangement step of allocating attribute values of the data in each of a relational database area of the memory unit, a node area of a graph database, and an area of relationships between the nodes of the graph database; a measurement step of measuring the time required for the application to access each of the attribute values arranged in each of the areas; a calculation step of calculating, using the measured time required for accessing each of the attribute values, a total of the time required for the application to access each attribute value in a combination of all different attribute values in the arranged areas; and a selection step of selecting an area in which each attribute value is arranged when the calculated total of the time required for access by the application is the smallest.
6. An optimization program for causing a computer to execute the following steps: an acquisition step of acquiring data to be processed by a specified application; an arrangement step of allocating attribute values of the data in each of a relational database area of a memory unit, an area of nodes in a graph database, and an area of relationships between nodes in the graph database; a measurement step of measuring the time required for the application to access each of the attribute values allocated in each of the areas; a calculation step of calculating, using the measured time required for accessing each of the attribute values, the total time required for the application to access each attribute value in all combinations of different attribute values in the allocated areas; and a selection step of selecting an area in which each attribute value is allocated when the calculated total time required for access by the application is the smallest.