WO2020232884A1 - 数据表迁移方法、装置、计算机设备和存储介质 - Google Patents
数据表迁移方法、装置、计算机设备和存储介质 Download PDFInfo
- Publication number
- WO2020232884A1 WO2020232884A1 PCT/CN2019/103170 CN2019103170W WO2020232884A1 WO 2020232884 A1 WO2020232884 A1 WO 2020232884A1 CN 2019103170 W CN2019103170 W CN 2019103170W WO 2020232884 A1 WO2020232884 A1 WO 2020232884A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- migration
- data table
- database
- data
- template
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
- G06F16/214—Database migration support
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- This application relates to a data table migration method, device, computer equipment and storage medium.
- Big data technology includes data storage, data analysis, and data mining. The basis of these technologies requires data collection.
- the inventor realizes that when collecting data, it is necessary to perform batch data migration processing on the data in the database.
- the traditional data migration process it is necessary to edit the code script for data migration, and perform data from the database according to the code script.
- Migration to gather data to form a large database, so as to process the data in the large database. It takes time to edit the corresponding code scripts in the traditional data migration process, resulting in low migration efficiency of the data migration process in the database.
- a data table migration method for example, a data table migration method, device, computer equipment, and storage medium are provided.
- a data table migration method executed by a server, includes:
- a data table migration device includes:
- Request acquisition module used to acquire migration template configuration request
- a template determining module configured to determine a preset script template corresponding to the migration task type in the migration template configuration request
- a script generation module configured to add the configuration parameters in the migration template configuration request to the preset script template to generate a data migration script
- the script execution module is used to execute the data migration script, and read the table filter conditions, the migration-out database address and the migration-in database address in the data migration script;
- the data table screening module is used to screen data tables from the database corresponding to the move-out database address according to the table screening conditions;
- the data table migration module is used to import the filtered data table into the database corresponding to the migration database address.
- a computer device including a memory and one or more processors, the memory stores computer readable instructions, when the computer readable instructions are executed by the processor, the one or more processors execute The following steps: a computer device including a memory and a processor, the memory stores a computer-readable storage medium, and the processor implements the following steps when executing the computer-readable storage medium:
- One or more non-volatile computer-readable storage media storing computer-readable instructions.
- the one or more processors perform the following steps: Obtain the migration template configuration request;
- Fig. 1 is an application scenario diagram of a data table migration method according to one or more embodiments
- FIG. 2 is a schematic flowchart of a data table migration method according to one or more embodiments
- FIG. 3 is a schematic flowchart of the steps of configuring a preset script module according to one or more embodiments
- FIG. 4 is a schematic flowchart of the steps of constructing an externally accessed data table according to one or more embodiments
- FIG. 5 is a schematic flowchart of the steps of importing a data table according to one or more embodiments
- FIG. 6 is a schematic flowchart of the steps of converting the data table format according to one or more embodiments
- FIG. 7 is a schematic flowchart of steps of configuring access permissions according to one or more embodiments.
- Fig. 8 is a structural block diagram of a data table migration device according to one or more embodiments.
- Fig. 9 is an internal structure diagram of a computer device according to one or more embodiments.
- the data table migration method provided in this application can be applied to the application environment as shown in FIG. 1.
- the terminal 102 communicates with the server 104 through the network through the network.
- the terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
- the server 104 may be implemented as an independent server or a server cluster composed of multiple servers.
- a data table migration method is provided. Taking the method applied to the server in FIG. 1 as an example, the method includes the following steps:
- the table migration page is displayed in the terminal.
- the table migration page is provided with a table migration button and a configuration parameter input box.
- the configuration input in the configuration parameter input box is obtained Parameters, generate a migration template configuration request according to the acquired configuration parameters, and send the migration template configuration request to the server.
- the server receives the migration template configuration request sent by the terminal.
- the migration template configuration request is a request for configuring a preset script template.
- S204 Determine a preset script template corresponding to the migration task type in the migration template configuration request.
- the server parses the received migration template configuration request, extracts the migration task type in the migration template configuration request by parsing, and queries the script template library for the preset script template corresponding to the migration task type.
- the preset script template is a script template for parameters to be configured for migrating the data table.
- the script template library includes multiple preset script templates, and each preset script template corresponds to a different migration task type.
- the server after querying the preset script template, the server obtains the configuration parameters in the migration template configuration request, determines where the configuration parameters are to be added in the preset script template, adds the configuration parameters to the preset script template, and generates data migration script.
- S208 Execute the data migration script, and read the table filtering conditions, the migration-out database address and the migration-in database address in the data migration script.
- the server executes the data migration script to generate a data migration instruction, and runs the data migration script according to the data migration instruction.
- Table filter conditions are the conditions that need to be met by the data tables that need to be migrated. Move out of the database address The address of the database to which the data table is moved, and the address of the database to which the data table is moved into.
- the server accesses the data table in the database corresponding to the outgoing database address, detects whether the accessed data table meets the table filter condition, filters out the data table that meets the table filter condition from the database, and obtains the filtered data table.
- the server accesses the database corresponding to the moved-in database address, obtains the remaining capacity in the database, and determines whether the capacity of storing the filtered data table is less than or equal to the remaining capacity in the database. When the capacity of storing the filtered data table is less than or equal to When there is remaining capacity in the database, import the filtered data table into the database corresponding to the migration database address, so as to store the filtered data table in the database corresponding to the migration database address.
- the server creates a migration task queue according to the filtered data table, reads the migration task from the migration task queue, obtains the corresponding data table according to the migration task, and imports the obtained data table into the corresponding database address. Database.
- the server creates migration tasks corresponding to each data table according to the filtered data tables, and constructs a preset number of migration task queues according to the migration tasks.
- the server receives the migration task read request sent by the terminal, reads the migration task from the migration task queue according to the migration task read request, and returns the read migration task to the terminal.
- S206 specifically includes a step of configuring a preset script module, and this step specifically includes the following content:
- the server obtains data migration configuration data by analyzing the migration template configuration request, identifies configuration parameters in the data migration configuration data, and extracts the identified configuration parameters from the data migration configuration data.
- the configuration parameters may specifically include the number of migration tasks to be created, the number of task queues, table filtering conditions, the address of the migration database, and the address of the migration database.
- the configuration parameter has a corresponding parameter identifier.
- the parameter identifier is an identifier used to identify the type or name of the configuration parameter.
- the server determines the parameter identifier corresponding to the identified configuration parameter in the preset script template.
- S306 Determine a parameter configuration location corresponding to the parameter identifier in the preset script template.
- the parameter configuration position is the position where the configuration parameter is added in the preset script template.
- the server queries the parameter identifier in the preset script template, determines the position of the queried parameter identifier in the preset script, and records the determined position as the parameter configuration position.
- the server determines the configuration parameter corresponding to the parameter configuration position, and adds the configuration parameter to the corresponding parameter configuration position in the preset script module, so as to generate the data migration script according to the preset script module to which the configuration parameter is added.
- the parameter identifier corresponding to the configuration parameter is obtained, the parameter configuration position corresponding to the parameter identifier in the preset script template, and the configuration parameter is added to the preset script template according to the parameter configuration position, ensuring that the preset script template The configuration accuracy of the configuration.
- a step of constructing an external access data table is specifically included, and this step specifically includes the following content:
- S402 Construct an external access data table according to the filtered data table.
- the server copies the filtered data table to obtain the data replication table, and uses the data replication table as the externally accessed data table corresponding to the filtered data table.
- the external access data table is a data table created to meet the requirement of normal access to the filtered data table sent from outside.
- the server monitors the access request of the database corresponding to the out-of-database address, extracts the data access address from the monitored access request, and when it determines that the data table corresponding to the data access address is the filtered data table, obtains the filtered data table location.
- the server Corresponding to the external data table address of the external access data table, modify the data access address in the access request to the obtained external data table address, so as to point the data access address in the access request to the external access data table.
- the server monitors the migration process of the filtered data table, and when it detects that the filtered data table is migrated, it determines the external access data table corresponding to the filtered data table, and deletes the determined external access data table. .
- an external access data table corresponding to the filtered data table is created, and when an access request corresponding to the filtered data table is monitored, the data access address in the access request is pointed to External access to the data table to ensure normal access to the filtered data table during the data migration process.
- S212 specifically includes a step of importing a data table, and this step specifically includes the following content:
- the server extracts the data table identifier corresponding to the filtered data table, queries the table dependency relationship corresponding to the data table identifier from the table dependency relationship stored in the database corresponding to the outgoing database address, and extracts the queried table dependency relationship.
- the table dependency relationship between data table 1, data table 2 and data table 3 is that data table 3 depends on data table 2, and data table 2 depends on data table 1, and the data migration order is determined according to the table dependency.
- the data migration sequence is data table 1 ⁇ data table 2 ⁇ data table 3
- first import data table 1 from the database corresponding to the migration database address to the database corresponding to the migration database address
- import data table 2 Import the database corresponding to the migration database address from the database corresponding to the migration database address
- import the data table 3 from the database corresponding to the migration database address into the database corresponding to the migration database address to complete the data table 1, data table 2 and 3 data table migration.
- the table dependency relationship between the filtered data tables is determined, the data table migration order is determined according to the table dependency relationship, and the filtered data tables are imported into the database corresponding to the migration database address according to the data table migration order to ensure the data After the table migration is completed, the migrated data table can be accessed normally based on the table dependency, thereby improving the accuracy of the data table migration.
- S212 specifically includes a step of converting the data table format, and this step specifically includes the following content:
- S602 Determine the data format in the database corresponding to the address of the migrated database.
- the server generates data format detection information according to the migration-in database address, and sends the data format detection information to the database corresponding to the migration-in database address to determine the data format in the database.
- the data format is the format of the data table stored in the database.
- S604 Perform format conversion on the filtered data table according to the determined data format to obtain a data table in the converted format.
- the server obtains the data format of the filtered data table, and compares the data format of the filtered data table with the data format in the database corresponding to the moved-in database address. If the data format is inconsistent, the filtered data table is compared The data format is converted, and the filtered data table is converted into the data format in the database corresponding to the moved into the database address, and the data table in the converted format is obtained.
- S606 Store the converted data table in the database corresponding to the migration-in database address.
- the server establishes a communication channel with the database corresponding to the migrated database address, and sends the converted data table to the database corresponding to the migrated database address for storage through the communication channel.
- the server determines the data format in the database corresponding to the database address after determining the data table migration sequence according to the table dependency, and performs format conversion on the filtered data table according to the determined data format to obtain the conversion According to the data table migration sequence, the converted data table is stored in the database corresponding to the migration database address.
- the data format of the filtered data table is converted to the data format in the database corresponding to the migrated database address, which further ensures the compatibility of the database with the migrated data table.
- the data table that is moved in can be processed and accessed normally.
- a step of configuring access permissions is further included, and this step specifically includes the following content:
- S702 Obtain access authority information corresponding to the filtered data table from the database corresponding to the move-out database address.
- the server statically generates an access permission acquisition request corresponding to the data table address, sends the access permission acquisition request to the database corresponding to the outgoing database address, and obtains the access permission corresponding to the filtered data table queried by the database according to the access permission acquisition request information.
- the server imports the filtered data table into the database corresponding to the migration database address, it obtains the migration data table address corresponding to the imported data table corresponding to the filtered data table, and transfers the filtered data table
- the outgoing data table address is stored correspondingly to the incoming data table address.
- the server configures the access rights for the moved-in data table address according to the moved-in data table address corresponding to the moved-out data table address of the filtered data table, and configures the access right information corresponding to the filtered data table among the obtained access right information information.
- the filtered data table is imported into the database corresponding to the address of the migrated data table, according to the access authority information of the filtered data table, the data imported in the database corresponding to the imported data address
- the table is configured with access authority information to ensure access control to the migrated data table and ensure the security of the migrated data table.
- a data table migration device 800 which includes: a request acquisition module 802, a template determination module 804, a script generation module 806, a script execution module 808, and a data table screening module 810 And the data table is moved into module 812, where:
- the request obtaining module 802 is used to obtain a migration template configuration request.
- the template determination module 804 is configured to determine the preset script template corresponding to the migration task type in the migration template configuration request.
- the script generation module 806 is used to add the configuration parameters in the migration template configuration request to the preset script template to generate a data migration script.
- the script execution module 808 is used to execute the data migration script, and read the table filtering conditions, the migration-out database address and the migration-in database address in the data migration script.
- the data table filtering module 810 is used to filter data tables from the database corresponding to the move-out database address according to the table filtering conditions.
- the data table migration module 812 is used for importing the filtered data table into the database corresponding to the migration database address.
- the script generation module 806 is also used to obtain the configuration parameters in the migration template configuration request; determine the parameter identifier corresponding to the configuration parameter; determine the parameter configuration location corresponding to the parameter identifier in the preset script template; configure according to the parameter The location adds the acquired configuration parameters to the preset script module.
- the data table migration device 800 further includes a data table monitoring module.
- the data table monitoring module is used to construct an external access data table according to the filtered data table; when the access request corresponding to the filtered data table is monitored, the data access address in the access request points to the external access data table; when monitoring When the filtered data table is migrated, delete the external access data table.
- the data table migration module 812 is also used to determine the table dependency between the filtered data tables; determine the data table migration order according to the table dependency; and select the filtered data tables according to the data table migration order Import the database corresponding to the moved-in database address.
- the data table migration module 812 is also used to determine the data format in the database corresponding to the database address to be migrated; format the filtered data table according to the determined data format to obtain the data table in the converted format ; Store the converted data table to the database corresponding to the migration database address.
- the data table migration device 800 further includes a permission configuration module.
- the authority configuration module is used to obtain the access authority information corresponding to the filtered data table from the database corresponding to the migration database address; according to the acquired access authority information, configure the access authority for the data in the database corresponding to the migration database address information.
- Each module in the above-mentioned data table migration device can be implemented in whole or in part by software, hardware, and a combination thereof.
- the foregoing modules may be embedded in the form of hardware or independent of the processor in the computer device, or may be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the foregoing modules.
- a computer device is provided.
- the computer device may be a server, and its internal structure diagram may be as shown in FIG. 9.
- the computer equipment includes a processor, a memory, a network interface and a database connected through a system bus.
- the processor of the computer device is used to provide calculation and control capabilities.
- the memory of the computer device includes a non-volatile storage medium and an internal memory.
- the non-volatile storage medium stores an operating system, a computer-readable storage medium, and a database.
- the internal memory provides an environment for the operation of the operating system in the non-volatile storage medium and the computer-readable storage medium.
- the database of the computer equipment is used to store data tables.
- the network interface of the computer device is used to communicate with an external terminal through a network connection.
- the computer-readable storage medium implements a data table migration method when executed by the processor.
- FIG. 9 is only a block diagram of part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
- the specific computer device may Including more or less parts than shown in the figure, or combining some parts, or having a different part arrangement.
- a computer device includes a memory and one or more processors.
- the memory stores computer-readable instructions.
- the one or more processors perform the following steps :
- Obtain the migration template configuration request ; determine the preset script template corresponding to the migration task type in the migration template configuration request; add the configuration parameters in the migration template configuration request to the preset script template to generate the data migration script; execute the data migration script and read The table screening conditions, the move-out database address and the move-in database address in the data migration script; filter data tables from the database corresponding to the move-out database address according to the table filter conditions; and import the filtered data tables into the move-in database address The corresponding database.
- the configuration parameters in the migration template configuration request are added to the preset script template
- generating the data migration script includes: obtaining the configuration parameters in the migration template configuration request; determining the parameter identifier corresponding to the configuration parameter; The parameter configuration position corresponding to the parameter identifier is determined in the script template; and the obtained configuration parameter is added to the preset script module according to the parameter configuration position.
- the processor after filtering the data tables from the database corresponding to the out-of-database address according to the table filtering conditions, the processor further implements the following steps when executing the computer-readable storage medium: constructing an external access data table according to the filtered data tables ; When the access request corresponding to the filtered data table is monitored, the data access address in the access request is pointed to the external access data table; and when the migration of the filtered data table is monitored, the external access data table is deleted.
- importing the filtered data tables into the database corresponding to the migration database address includes: determining the table dependency relationship between the filtered data tables; determining the data table migration sequence according to the table dependency; and according to the data table The migration sequence imports the filtered data table into the database corresponding to the migration database address.
- importing the filtered data table into the database corresponding to the moved-in database address includes: determining the data format in the database corresponding to the moved-in database address; and performing format conversion on the filtered data table according to the determined data format , Obtain the data table in the converted format; and store the data table in the converted format in the database corresponding to the migration-in database address.
- the processor after importing the filtered data table into the database corresponding to the migrated database address, the processor also implements the following steps when executing the computer-readable storage medium: obtain the filtered data from the database corresponding to the migrated database address The access authority information corresponding to the data table of the data table; and according to the obtained access authority information, the access authority information is configured for the data in the database corresponding to the moved-in database address.
- One or more non-volatile computer-readable storage media storing computer-readable instructions.
- the one or more processors execute the following steps:
- Obtain the migration template configuration request ; determine the preset script template corresponding to the migration task type in the migration template configuration request; add the configuration parameters in the migration template configuration request to the preset script template to generate the data migration script; execute the data migration script and read The table screening conditions, the move-out database address and the move-in database address in the data migration script; filter data tables from the database corresponding to the move-out database address according to the table filter conditions; and import the filtered data tables into the move-in database address The corresponding database.
- the configuration parameters in the migration template configuration request are added to the preset script template
- generating the data migration script includes: obtaining the configuration parameters in the migration template configuration request; determining the parameter identifier corresponding to the configuration parameter; and It is assumed that the parameter configuration position corresponding to the parameter identifier is determined in the script template; the obtained configuration parameters are added to the preset script module according to the parameter configuration position.
- the computer-readable storage medium after filtering the data tables from the database corresponding to the outgoing database address according to the table filtering conditions, the computer-readable storage medium further implements the following steps when being executed by the processor: constructing external access data according to the filtered data tables Table; when the access request corresponding to the filtered data table is monitored, the data access address in the access request is pointed to the external access data table; and when the migration of the filtered data table is monitored, the external access data table is deleted.
- importing the filtered data tables into the database corresponding to the migration database address includes: determining the table dependency relationship between the filtered data tables; determining the data table migration sequence according to the table dependency; and according to the data table The migration sequence imports the filtered data table into the database corresponding to the migration database address.
- importing the filtered data table into the database corresponding to the inbound database address includes: determining the data format in the database corresponding to the inbound database address; performing format conversion on the filtered data table according to the determined data format, Obtain the converted format data table; and store the converted format data table in the database corresponding to the migration-in database address.
- the computer-readable storage medium further implements the following steps when being executed by the processor: obtain the filtered data from the database corresponding to the migrated database address Access authority information corresponding to the obtained data table; and according to the obtained access authority information, configure the access authority information for the data in the database corresponding to the moved-in database address.
- Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
- Volatile memory may include random access memory (RAM) or external cache memory.
- RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
一种数据表迁移方法,包括:获取迁移模板配置请求;确定所述迁移模板配置请求中迁移任务类型对应的预设脚本模板;将所述迁移模板配置请求中的配置参数添加到所述预设脚本模板,生成数据迁移脚本;执行所述数据迁移脚本,读取所述数据迁移脚本中的表筛选条件、迁出数据库地址和迁入数据库地址;根据所述表筛选条件从所述迁出数据库地址对应的数据库中筛选数据表;将筛选到的数据表导入所述迁入数据库地址对应的数据库。
Description
相关申请的交叉引用
本申请要求于2019年5月20日提交中国专利局,申请号为2019104195035,申请名称为“数据表迁移方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及一种数据表迁移方法、装置、计算机设备和存储介质。
随着计算机技术和互联网技术的发展,出现了大数据技术,大数据技术包括数据存储、数据分析和数据挖掘等多种技术,这些技术的基础都需要通过将数据进行汇集。
然而,发明人意识到,在汇集数据时,需要对数据库中的数据进行批量数据的迁移处理,在传统的数据迁移过程中,需要编辑用于数据迁移的代码脚本,根据代码脚本从数据库进行数据迁移,以对数据汇集形成大数据库,从而对大数据库中的数据进行处理。传统的数据迁移过程编辑相应的代码脚本比较耗费时间,导致数据库中数据迁移的过程迁移效率较低。
发明内容
根据本申请公开的各种实施例,提供一种数据表迁移方法、装置、计算机设备和存储介质。
一种数据表迁移方法,由服务器执行,包括:
获取迁移模板配置请求;
确定所述迁移模板配置请求中迁移任务类型对应的预设脚本模板;
将所述迁移模板配置请求中的配置参数添加到所述预设脚本模板,生成数据迁移脚本;
执行所述数据迁移脚本,读取所述数据迁移脚本中的表筛选条件、迁出数据库地址和迁入数据库地址;
根据所述表筛选条件从所述迁出数据库地址对应的数据库中筛选数据表;及
将筛选到的数据表导入所述迁入数据库地址对应的数据库。
一种数据表迁移装置,包括:
请求获取模块,用于获取迁移模板配置请求;
模板确定模块,用于确定所述迁移模板配置请求中迁移任务类型对应的预设脚本模板;
脚本生成模块,用于将所述迁移模板配置请求中的配置参数添加到所述预设脚本模板,生成数据迁移脚本;
脚本执行模块,用于执行所述数据迁移脚本,读取所述数据迁移脚本中的表筛选条件、迁出数据库地址和迁入数据库地址;
数据表筛选模块,用于根据所述表筛选条件从所述迁出数据库地址对应的数据库中筛选数据表;及
数据表迁入模块,用于将筛选到的数据表导入所述迁入数据库地址对应的数据库。
一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:一种计算机设备,包括存储器和处理器,所述存储器存储有计算机可读存储介质,所述处理器执行所述计算机可读存储介质时实现以下步骤:
获取迁移模板配置请求;
确定所述迁移模板配置请求中迁移任务类型对应的预设脚本模板;
将所述迁移模板配置请求中的配置参数添加到所述预设脚本模板,生成数据迁移脚本;
执行所述数据迁移脚本,读取所述数据迁移脚本中的表筛选条件、迁出数据库地址和迁入数据库地址;
根据所述表筛选条件从所述迁出数据库地址对应的数据库中筛选数据表;及
将筛选到的数据表导入所述迁入数据库地址对应的数据库。
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:获取迁移模板配置请求;
确定所述迁移模板配置请求中迁移任务类型对应的预设脚本模板;
将所述迁移模板配置请求中的配置参数添加到所述预设脚本模板,生成数据迁移脚本;
执行所述数据迁移脚本,读取所述数据迁移脚本中的表筛选条件、迁出数据库地址和迁入数据库地址;
根据所述表筛选条件从所述迁出数据库地址对应的数据库中筛选数据表;及
将筛选到的数据表导入所述迁入数据库地址对应的数据库。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为根据一个或多个实施例中数据表迁移方法的应用场景图;
图2为根据一个或多个实施例中数据表迁移方法的流程示意图;
图3为根据一个或多个实施例中配置预设脚本模块的步骤的流程示意图;
图4为根据一个或多个实施例中构建外部访问数据表的步骤的流程示意图;
图5为根据一个或多个实施例中导入数据表的步骤的流程示意图;
图6为根据一个或多个实施例中转换数据表格式的步骤的流程示意图;
图7为根据一个或多个实施例中配置访问权限的步骤的流程示意图;
图8为根据一个或多个实施例中数据表迁移装置的结构框图;
图9为根据一个或多个实施例中计算机设备的内部结构图。
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请提供的数据表迁移方法,可以应用于如图1所示的应用环境中。其中,终端102通过网络与服务器104通过网络进行通信。其中,终端102可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备,服务器104可以用独立的服务器或者是多个服务器组成的服务器集群来实现。
在其中一个实施例中,如图2所示,提供了一种数据表迁移方法,以该方法应用于图1中的服务器为例进行说明,包括以下步骤:
S202,获取迁移模板配置请求。
具体地,终端中展示表迁移页面,表迁移页面中设置有表迁移按钮和配置参数输入框,在检测到表迁移页面中的表迁移按钮的点击操作时,获取配置参数输入框中输入的配置参数,根据获取到的配置参数生成迁移模板配置请求,将迁移模板配置请求发送至服务器。服务器接收终端发送的迁移模板配置请求。迁移模板配置请求为用于对预设脚本模板进行配置的请求。
S204,确定迁移模板配置请求中迁移任务类型对应的预设脚本模板。
具体地,服务器对接收到的迁移模板配置请求进行解析,通过解析提取迁移模板配置请求中的迁移任务类型,在脚本模板库中查询与迁移任务类型对应的预设脚本模板。预设脚本模板为用于对数据表进行迁移的待配置参数的脚本模板。脚本模板库中包括多个预设脚本模板,各预设脚本模板分别对应不同的迁移任务类型。
S206,将迁移模板配置请求中的配置参数添加到预设脚本模板,生成数据迁移脚本。
具体地,服务器在查询到预设脚本模板后,获取迁移模板配置请求中的配置参数,确定配置参数在预设脚本模板中的待添加位置,将配置参数添加到预设脚本模板,生成数据迁移脚本。
S208,执行数据迁移脚本,读取所述数据迁移脚本中的表筛选条件、迁出数据库地址和迁入数据库地址。
具体地,服务器生成数据迁移脚本后,执行数据迁移脚本生成数据迁移指令,根据数据迁移指令运行数据迁移脚本,在运行数据迁移脚本时,执行数据迁移脚本中的脚本语句,通 过执行脚本语句读取到数据迁移脚本中的表筛选条件、迁出数据库地址和迁入数据库地址。表筛选条件为需要进行数据表迁移的数据表所需满足的条件。迁出数据库地址数据表迁出的数据库的地址,迁入数据库地址数据表迁入的数据库的地址。
S210,根据表筛选条件从迁出数据库地址对应的数据库中筛选数据表。
具体地,服务器对迁出数据库地址对应的数据库中的数据表进行访问,检测访问的数据表是否满足表筛选条件,从数据库中筛选出满足表筛选条件的数据表,得到筛选到的数据表。
S212,将筛选到的数据表导入迁入数据库地址对应的数据库。
具体地,服务器对迁入数据库地址对应的数据库进行访问,获取数据库中剩余容量,判断存储筛选到的数据表的容量是否小于等于数据库中的剩余容量,当存储筛选到的数据表的容量小于等于数据库中的剩余容量时,将筛选到的数据表导入迁入数据库地址对应的数据库,以将筛选到的数据表存储至迁入数据库地址对应的数据库。
在其中一个实施例中,服务器根据筛选到的数据表创建迁移任务队列,从迁移任务队列中读取迁移任务,根据迁移任务获取相应的数据表,将获取到的数据表导入迁入数据库地址对应的数据库。
在其中一个实施例中,服务器根据筛选到的数据表创建各数据表对应的迁移任务,根据迁移任务构建预设数量的迁移任务队列。服务器接收终端发送迁移任务读取请求,根据迁移任务读取请求从迁移任务队列中读取迁移任务,将读取到的迁移任务返回至终端。
本实施例中,在进行数据表迁移的过程中,无需重新编写用于迁移数据表的数据迁移脚本,只需要根据迁移模板配置请求中的配置参数对预设脚本模板进行配置,生成数据迁移脚本,提高了数据迁移脚本的效率。直接根据生成的数据迁移脚本中表筛选条件、迁出数据库地址和迁入数据库地址进行数据表迁移,从而提高了数据表迁移的效率。
如图3所示,在其中一个实施例中,S206具体包括配置预设脚本模块的步骤,该步骤具体包括以下内容:
S302,获取迁移模板配置请求中的配置参数。
具体地,服务器通过对迁移模板配置请求进行解析,得到数据迁移配置数据,识别数据迁移配置数据中的配置参数,从数据迁移配置数据中提取识别到的配置参数。配置参数具体可以包括迁移任务创建数量、任务队列数量、表筛选条件、迁出数据库地址和迁入数据库地址。
S304,确定配置参数对应的参数标识。
具体地,配置参数存在对应参数标识。参数标识为用于标识配置参数的类型或者名称的标识。服务器在预设脚本模板中确定与识别到的配置参数对应的参数标识。
S306,在预设脚本模板中确定参数标识对应的参数配置位置。
具体地,参数配置位置为预设脚本模板中配置参数添加的位置。服务器在预设脚本模板中查询参数标识,确定查询到的参数标识在预设脚本中的位置,记录确定的位置作为参数配置位置。
S308,按照参数配置位置将获取到的配置参数添加到预设脚本模块中。
具体地,服务器确定参数配置位置对应的配置参数,将配置参数添加到预设脚本模块中相应的参数配置位置,以便根据添加了配置参数的预设脚本模块生成数据迁移脚本。
本实施例中,确定获取到配置参数对应的参数标识,在预设脚本模板中参数标识对应的参数配置位置,按照参数配置位置在预设脚本模板中添加配置参数,保证了对预设脚本模板进行配置的配置准确率。
如图4所示,在其中一个实施例中,S210之后具体还包括构建外部访问数据表的步骤,该步骤具体包括以下内容:
S402,根据筛选到的数据表构建外部访问数据表。
具体地,服务器在筛选到数据表之后,对筛选到的数据表进行复制,得到数据复制表,以数据复制表作为与筛选到的数据表对应的外部访问数据表。外部访问数据表为满足外部发送的对筛选到的数据表进行正常访问所创建的数据表。
S404,当监听到对筛选到的数据表对应的访问请求时,将访问请求中的数据访问地址指向外部访问数据表。
具体地,服务器对迁出数据库地址对应的数据库的访问请求进行监听,从监听到访问请求中提取数据访问地址,确定数据访问地址中对应的为筛选到的数据表时,获取筛选到数据表所对应的外部访问数据表的外部数据表地址,将访问请求中的数据访问地址修改为获取的外部数据表地址,以将访问请求中的数据访问地址指向外部访问数据表。
S406,当监听到筛选到的数据表迁移完毕时,删除外部访问数据表。
具体地,服务器对将筛选到的数据表的迁移过程进行监听,当监听到筛选到的数据表迁移完毕时,确定与筛选到的数据表对应的外部访问数据表,删除确定的外部访问数据表。
本实施例中,在数据表迁移过程中,创建与筛选到的数据表对应的外部访问数据表,当监听到对筛选到的数据表对应的访问请求时,将访问请求中的数据访问地址指向外部访问数据表,从而保证数据迁移过程中对筛选到的数据表的正常访问。
如图5所示,在其中一个实施例中,S212具体包括导入数据表的步骤,该步骤具体包括以下内容:
S502,确定筛选到的数据表之间的表依赖关系。
具体地,服务器提取筛选到的数据表对应的数据表标识,从迁出数据库地址对应的数据库中存储的表依赖关系中查询与数据表标识对应的表依赖关系,提取查询到的表依赖关系。
S504,根据表依赖关系确定数据表迁移顺序。
举例说明,数据表1、数据表2和数据表3之间的表依赖关系为数据表3依赖于数据表2,数据表2依赖于数据表1,根据表依赖关系确定数据迁移顺序为数据表1→数据表2→数据表3。
S506,按照数据表迁移顺序将筛选到的数据表导入迁入数据库地址对应的数据库。
举例说明,当数据迁移顺序为数据表1→数据表2→数据表3时,则先将数据表1从迁出数据库地址对应的数据库中导入迁移数据库地址对应的数据库中,再将数据表2从迁出数据库地址对应的数据库中导入迁移数据库地址对应的数据库中,最后再将数据表3从迁出数 据库地址对应的数据库中导入迁移数据库地址对应的数据库中,从而完成数据表1、数据表2和数据表3的数据表迁移。
本实施例中,确定筛选到的数据表之间的表依赖关系,根据表依赖关系确定数据表迁移顺序,按照数据表迁移顺序将筛选到的数据表导入迁入数据库地址对应的数据库,保证数据表迁移完成后,迁移的数据表可以基于表依赖关系被正常访问,从而提高数据表迁移的准确性。
如图6所示,在其中一个实施例中,S212具体包括转换数据表格式的步骤,该步骤具体包括以下内容:
S602,确定迁入数据库地址对应的数据库中的数据格式。
具体地,服务器根据迁入数据库地址生成数据格式检测信息,将数据格式检测信息发送至迁入数据库地址对应的数据库,确定数据库中的数据格式。数据格式为存储在数据库中数据表的格式。
S604,按照确定的数据格式对筛选到的数据表进行格式转换,得到转换格式的数据表。
具体地,服务器获取筛选到的数据表的数据格式,将筛选到的数据表的数据格式与迁入数据库地址对应的数据库中的数据格式进行比较,若数据格式不一致,则对筛选到的数据表的数据格式进行转换,将筛选到的数据表转换为迁入数据库地址对应的数据库中的数据格式,得到转换格式的数据表。
S606,将转换格式的数据表存储至迁入数据库地址对应的数据库。
具体地,服务器与迁入数据库地址对应的数据库建立通信通道,通过通信通道将转换格式的数据表,发送至迁入数据库地址对应的数据库进行存储。
在其中一个实施例中,服务器在根据表依赖关系确定数据表迁移顺序后,确定迁入数据库地址对应的数据库中的数据格式,按照确定的数据格式对筛选到的数据表进行格式转换,得到转换格式的数据表,按照数据表迁移顺序,将转换格式的数据表存储至所述迁入数据库地址对应的数据库。
本实施例中,在数据表迁移过程中,将筛选到的数据表的数据格式进行转换,转换为与迁入数据库地址对应的数据库中数据格式,进一步保证了数据库对迁入数据表的兼容,可以对迁入的数据表进行正常处理和访问。
如图7所示,在其中一个实施例中,S212之后还包括配置访问权限的步骤,该步骤具体包括以下内容:
S702,从迁出数据库地址对应的数据库中,获取筛选到的数据表对应的访问权限信息。
具体地,服务器静生成数据表地址对应的访问权限获取请求,将访问权限获取请求发送至迁出数据库地址对应的数据库,获取数据库根据访问权限获取请求查询到的与筛选到的数据表对应访问权限信息。
S704,按照获取到的访问权限信息,对迁入数据库地址对应的数据库中的数据配置访问权限信息。
具体地,服务器在将筛选到的数据表导入迁入数据库地址对应的数据库后,获取与筛选 到的数据表对应的导入的数据表对应的迁入数据表地址,将筛选到的数据表的迁出数据表地址与迁入数据表地址对应存储。服务器根据筛选到的数据表的迁出数据表地址对应的迁入数据表地址,将获取到的访问权限信息中与筛选到的数据表对应的访问权限信息,为迁入数据表地址配置访问权限信息。
本实施例中,在将筛选到的数据表导入至迁入数据表地址对应的数据库中之后,按照筛选到的数据表的访问权限信息,对迁入数据地址对应的数据库中所迁入的数据表配置访问权限信息,从而保证对迁入的数据表进行访问控制,保证迁入的数据表的安全性。
应该理解的是,虽然图2-7的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2-7中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
在其中一个实施例中,如图8所示,提供了一种数据表迁移装置800,包括:请求获取模块802、模板确定模块804、脚本生成模块806、脚本执行模块808、数据表筛选模块810和数据表迁入模块812,其中:
请求获取模块802,用于获取迁移模板配置请求。
模板确定模块804,用于确定迁移模板配置请求中迁移任务类型对应的预设脚本模板。
脚本生成模块806,用于将迁移模板配置请求中的配置参数添加到预设脚本模板,生成数据迁移脚本。
脚本执行模块808,用于执行数据迁移脚本,读取所述数据迁移脚本中的表筛选条件、迁出数据库地址和迁入数据库地址。
数据表筛选模块810,用于根据表筛选条件从迁出数据库地址对应的数据库中筛选数据表。
数据表迁入模块812,用于将筛选到的数据表导入迁入数据库地址对应的数据库。
在其中一个实施例中,脚本生成模块806还用于获取迁移模板配置请求中的配置参数;确定配置参数对应的参数标识;在预设脚本模板中确定参数标识对应的参数配置位置;按照参数配置位置将获取到的配置参数添加到预设脚本模块中。
在其中一个实施例中,数据表迁移装置800还包括数据表监听模块。
数据表监听模块,用于根据筛选到的数据表构建外部访问数据表;当监听到对筛选到的数据表对应的访问请求时,将访问请求中的数据访问地址指向外部访问数据表;当监听到筛选到的数据表迁移完毕时,删除外部访问数据表。
在其中一个实施例中,数据表迁入模块812还用于确定筛选到的数据表之间的表依赖关系;根据表依赖关系确定数据表迁移顺序;按照数据表迁移顺序将筛选到的数据表导入迁入数据库地址对应的数据库。
在其中一个实施例中,数据表迁入模块812还用于确定迁入数据库地址对应的数据库中的数据格式;按照确定的数据格式对筛选到的数据表进行格式转换,得到转换格式的数据表;将转换格式的数据表存储至迁入数据库地址对应的数据库。
在其中一个实施例中,数据表迁移装置800还包括权限配置模块。
权限配置模块,用于从迁出数据库地址对应的数据库中,获取筛选到的数据表对应的访问权限信息;按照获取到的访问权限信息,对迁入数据库地址对应的数据库中的数据配置访问权限信息。
本实施例中,在进行数据表迁移的过程中,无需重新编写用于迁移数据表的数据迁移脚本,只需要根据迁移模板配置请求中的配置参数对预设脚本模板进行配置,生成数据迁移脚本,提高了数据迁移脚本的效率。直接根据生成的数据迁移脚本中表筛选条件、迁出数据库地址和迁入数据库地址进行数据表迁移,从而提高了数据表迁移的效率。
关于数据表迁移装置的具体限定可以参见上文中对于数据表迁移方法的限定,。上述数据表迁移装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在其中一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图9所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读存储介质和数据库。该内存储器为非易失性存储介质中的操作系统和计算机可读存储介质的运行提供环境。该计算机设备的数据库用于存储数据表。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读存储介质被处理器执行时以实现一种数据表迁移方法。
本领域技术人员可以理解,图9中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
在一个实施例中,一种计算机设备,包括存储器和一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被处理器执行时,使得一个或多个处理器执行以下步骤:提供了一种计算机设备,包括存储器和处理器,该存储器存储有计算机可读存储介质,该处理器执行计算机可读存储介质时实现以下步骤:
获取迁移模板配置请求;确定迁移模板配置请求中迁移任务类型对应的预设脚本模板;将迁移模板配置请求中的配置参数添加到预设脚本模板,生成数据迁移脚本;执行数据迁移脚本,读取所述数据迁移脚本中的表筛选条件、迁出数据库地址和迁入数据库地址;根据表筛选条件从迁出数据库地址对应的数据库中筛选数据表;及将筛选到的数据表导入迁入数据库地址对应的数据库。
在其中一个实施例中,将迁移模板配置请求中的配置参数添加到预设脚本模板,生成数 据迁移脚本包括:获取迁移模板配置请求中的配置参数;确定配置参数对应的参数标识;在预设脚本模板中确定参数标识对应的参数配置位置;及按照参数配置位置将获取到的配置参数添加到预设脚本模块中。
在其中一个实施例中,根据表筛选条件从迁出数据库地址对应的数据库中筛选数据表之后,处理器执行计算机可读存储介质时还实现以下步骤:根据筛选到的数据表构建外部访问数据表;当监听到对筛选到的数据表对应的访问请求时,将访问请求中的数据访问地址指向外部访问数据表;及当监听到筛选到的数据表迁移完毕时,删除外部访问数据表。
在其中一个实施例中,将筛选到的数据表导入迁入数据库地址对应的数据库包括:确定筛选到的数据表之间的表依赖关系;根据表依赖关系确定数据表迁移顺序;及按照数据表迁移顺序将筛选到的数据表导入迁入数据库地址对应的数据库。
在其中一个实施例中,将筛选到的数据表导入迁入数据库地址对应的数据库包括:确定迁入数据库地址对应的数据库中的数据格式;按照确定的数据格式对筛选到的数据表进行格式转换,得到转换格式的数据表;及将转换格式的数据表存储至迁入数据库地址对应的数据库。
在其中一个实施例中,将筛选到的数据表导入迁入数据库地址对应的数据库之后,处理器执行计算机可读存储介质时还实现以下步骤:从迁出数据库地址对应的数据库中,获取筛选到的数据表对应的访问权限信息;及按照获取到的访问权限信息,对迁入数据库地址对应的数据库中的数据配置访问权限信息。
本实施例中,在进行数据表迁移的过程中,无需重新编写用于迁移数据表的数据迁移脚本,只需要根据迁移模板配置请求中的配置参数对预设脚本模板进行配置,生成数据迁移脚本,提高了数据迁移脚本的效率。直接根据生成的数据迁移脚本中表筛选条件、迁出数据库地址和迁入数据库地址进行数据表迁移,从而提高了数据表迁移的效率。
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:
获取迁移模板配置请求;确定迁移模板配置请求中迁移任务类型对应的预设脚本模板;将迁移模板配置请求中的配置参数添加到预设脚本模板,生成数据迁移脚本;执行数据迁移脚本,读取所述数据迁移脚本中的表筛选条件、迁出数据库地址和迁入数据库地址;根据表筛选条件从迁出数据库地址对应的数据库中筛选数据表;及将筛选到的数据表导入迁入数据库地址对应的数据库。
在其中一个实施例中,将迁移模板配置请求中的配置参数添加到预设脚本模板,生成数据迁移脚本包括:获取迁移模板配置请求中的配置参数;确定配置参数对应的参数标识;及在预设脚本模板中确定参数标识对应的参数配置位置;按照参数配置位置将获取到的配置参数添加到预设脚本模块中。
在其中一个实施例中,根据表筛选条件从迁出数据库地址对应的数据库中筛选数据表之后,计算机可读存储介质被处理器执行时还实现以下步骤:根据筛选到的数据表构建外部访 问数据表;当监听到对筛选到的数据表对应的访问请求时,将访问请求中的数据访问地址指向外部访问数据表;及当监听到筛选到的数据表迁移完毕时,删除外部访问数据表。
在其中一个实施例中,将筛选到的数据表导入迁入数据库地址对应的数据库包括:确定筛选到的数据表之间的表依赖关系;根据表依赖关系确定数据表迁移顺序;及按照数据表迁移顺序将筛选到的数据表导入迁入数据库地址对应的数据库。
在其中一个实施例中,将筛选到的数据表导入迁入数据库地址对应数据库包括:确定迁入数据库地址对应的数据库中的数据格式;按照确定的数据格式对筛选到的数据表进行格式转换,得到转换格式的数据表;及将转换格式的数据表存储至迁入数据库地址对应的数据库。
在其中一个实施例中,将筛选到的数据表导入迁入数据库地址对应的数据库之后,计算机可读存储介质被处理器执行时还实现以下步骤:从迁出数据库地址对应的数据库中,获取筛选到的数据表对应的访问权限信息;及按照获取到的访问权限信息,对迁入数据库地址对应的数据库中的数据配置访问权限信息。
本实施例中,在进行数据表迁移的过程中,无需重新编写用于迁移数据表的数据迁移脚本,只需要根据迁移模板配置请求中的配置参数对预设脚本模板进行配置,生成数据迁移脚本,提高了数据迁移脚本的效率。直接根据生成的数据迁移脚本中表筛选条件、迁出数据库地址和迁入数据库地址进行数据表迁移,从而提高了数据表迁移的效率。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读存储介质来指令相关的硬件来完成,所述的计算机可读存储介质可存储于一非易失性计算机可读取存储介质中,该计算机可读存储介质在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。
Claims (20)
- 一种数据表迁移方法,由服务器执行,包括:获取迁移模板配置请求;确定所述迁移模板配置请求中迁移任务类型对应的预设脚本模板;将所述迁移模板配置请求中的配置参数添加到所述预设脚本模板,生成数据迁移脚本;执行所述数据迁移脚本,读取所述数据迁移脚本中的表筛选条件、迁出数据库地址和迁入数据库地址;根据所述表筛选条件从所述迁出数据库地址对应的数据库中筛选数据表;及将筛选到的数据表导入所述迁入数据库地址对应的数据库。
- 根据权利要求1所述的方法,其特征在于,所述将所述迁移模板配置请求中的配置参数添加到所述预设脚本模板,生成数据迁移脚本包括:获取所述迁移模板配置请求中的配置参数;确定所述配置参数对应的参数标识;在所述预设脚本模板中确定所述参数标识对应的参数配置位置;及按照所述参数配置位置将获取到的配置参数添加到所述预设脚本模块中。
- 根据权利要求1所述的方法,其特征在于,所述根据所述表筛选条件从所述迁出数据库地址对应的数据库中筛选数据表之后,还包括:根据筛选到的数据表构建外部访问数据表;当监听到对所述筛选到的数据表对应的访问请求时,将所述访问请求中的数据访问地址指向所述外部访问数据表;及当监听到所述筛选到的数据表迁移完毕时,删除所述外部访问数据表。
- 根据权利要求1所述的方法,其特征在于,所述将筛选到的数据表导入所述迁入数据库地址对应的数据库包括:确定筛选到的数据表之间的表依赖关系;根据所述表依赖关系确定数据表迁移顺序;及按照数据表迁移顺序将所述筛选到的数据表导入所述迁入数据库地址对应的数据库。
- 根据权利要求1所述的方法,其特征在于,所述将筛选到的数据表导入所述迁入数据库地址对应的数据库包括:确定所述迁入数据库地址对应的数据库中的数据格式;按照确定的数据格式对筛选到的数据表进行格式转换,得到转换格式的数据表;及将转换格式的数据表存储至所述迁入数据库地址对应的数据库。
- 根据权利要求1-5中任意一项所述的方法,其特征在于,所述将筛选到的数据表导入所述迁入数据库地址对应的数据库之后,还包括:从所述迁出数据库地址对应的数据库中,获取所述筛选到的数据表对应的访问权限信息;及按照获取到的访问权限信息,对所述迁入数据库地址对应的数据库中的数据配置访问权 限信息。
- 根据权利要求1所述的方法,其特征在于,所述确定所述迁移模板配置请求中迁移任务类型对应的预设脚本模板包括:对所述迁移模板配置请求进行解析,得到所述迁移模板配置请求中的迁移任务类型;及在脚本模板库中查询与所述迁移任务类型对应的预设脚本模板。
- 根据权利要求1所述的方法,其特征在于,所述根据所述表筛选条件从所述迁出数据库地址对应的数据库中筛选数据表包括:对所述迁出数据库地址对应的数据库中的数据表进行访问;检测所访问的数据表是否满足表筛选条件;及若满足筛选条件时,从所述数据库中筛选出满足所述表筛选条件的数据表。
- 根据权利要求1所述的方法,其特征在于,所述将筛选到的数据表导入所述迁入数据库地址对应的数据库包括:对所述迁入数据库地址对应的数据库进行访问,获取所述数据库的剩余容量;判断所筛选到的数据表的数据量是否小于或等于所述剩余容量;及若是,将所筛选到的数据表导入所述数据库。
- 一种数据表迁移装置,其特征在于,所述装置包括:请求获取模块,用于获取迁移模板配置请求;模板确定模块,用于确定所述迁移模板配置请求中迁移任务类型对应的预设脚本模板;脚本生成模块,用于将所述迁移模板配置请求中的配置参数添加到所述预设脚本模板,生成数据迁移脚本;脚本执行模块,用于执行所述数据迁移脚本,读取所述数据迁移脚本中的表筛选条件、迁出数据库地址和迁入数据库地址;数据表筛选模块,用于根据所述表筛选条件从所述迁出数据库地址对应的数据库中筛选数据表;及数据表迁入模块,用于将筛选到的数据表导入所述迁入数据库地址对应的数据库。
- 根据权利要求10所述的装置,其特征在于,所述脚本生成模块还用于获取所述迁移模板配置请求中的配置参数;确定所述配置参数对应的参数标识;及在所述预设脚本模板中确定所述参数标识对应的参数配置位置;按照所述参数配置位置将获取到的配置参数添加到所述预设脚本模块中。
- 一种计算机设备,包括存储器及一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:获取迁移模板配置请求;确定所述迁移模板配置请求中迁移任务类型对应的预设脚本模板;将所述迁移模板配置请求中的配置参数添加到所述预设脚本模板,生成数据迁移脚本;执行所述数据迁移脚本,读取所述数据迁移脚本中的表筛选条件、迁出数据库地址和迁入数据库地址;根据所述表筛选条件从所述迁出数据库地址对应的数据库中筛选数据表;及将筛选到的数据表导入所述迁入数据库地址对应的数据库。
- 根据权利要求12所述的计算机设备,其特征在于,所述将所述迁移模板配置请求中的配置参数添加到所述预设脚本模板,生成数据迁移脚本;所述处理器执行所述计算机可读指令时还执行以下步骤:获取所述迁移模板配置请求中的配置参数;确定所述配置参数对应的参数标识;在所述预设脚本模板中确定所述参数标识对应的参数配置位置;及按照所述参数配置位置将获取到的配置参数添加到所述预设脚本模块中。
- 根据权利要求12所述的计算机设备,其特征在于,所述根据所述表筛选条件从所述迁出数据库地址对应的数据库中筛选数据表之后,所述处理器执行所述计算机可读指令时还执行以下步骤:根据筛选到的数据表构建外部访问数据表;当监听到对所述筛选到的数据表对应的访问请求时,将所述访问请求中的数据访问地址指向所述外部访问数据表;及当监听到所述筛选到的数据表迁移完毕时,删除所述外部访问数据表。
- 根据权利要求12所述的计算机设备,其特征在于,所述将筛选到的数据表导入所述迁入数据库地址对应的数据库,所述处理器执行所述计算机可读指令时还执行以下步骤:确定筛选到的数据表之间的表依赖关系;根据所述表依赖关系确定数据表迁移顺序;及按照数据表迁移顺序将所述筛选到的数据表导入所述迁入数据库地址对应的数据库。
- 根据权利要求12所述的计算机设备,其特征在于,所述将筛选到的数据表导入所述迁入数据库地址对应的数据库,所述处理器执行所述计算机可读指令时还执行以下步骤:确定所述迁入数据库地址对应的数据库中的数据格式;按照确定的数据格式对筛选到的数据表进行格式转换,得到转换格式的数据表;及将转换格式的数据表存储至所述迁入数据库地址对应的数据库。
- 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:获取迁移模板配置请求;确定所述迁移模板配置请求中迁移任务类型对应的预设脚本模板;将所述迁移模板配置请求中的配置参数添加到所述预设脚本模板,生成数据迁移脚本;执行所述数据迁移脚本,读取所述数据迁移脚本中的表筛选条件、迁出数据库地址和迁入数据库地址;根据所述表筛选条件从所述迁出数据库地址对应的数据库中筛选数据表;及将筛选到的数据表导入所述迁入数据库地址对应的数据库。
- 根据权利要求16所述的存储介质,其特征在于,所述将所述迁移模板配置请求中的配置参数添加到所述预设脚本模板,生成数据迁移脚本,所述计算机可读指令被所述处理器执行时还执行以下步骤:获取所述迁移模板配置请求中的配置参数;确定所述配置参数对应的参数标识;在所述预设脚本模板中确定所述参数标识对应的参数配置位置;及按照所述参数配置位置将获取到的配置参数添加到所述预设脚本模块中。
- 根据权利要求16所述的存储介质,其特征在于,所述根据所述表筛选条件从所述迁出数据库地址对应的数据库中筛选数据表之后,所述计算机可读指令被所述处理器执行时还执行以下步骤:根据筛选到的数据表构建外部访问数据表;当监听到对所述筛选到的数据表对应的访问请求时,将所述访问请求中的数据访问地址指向所述外部访问数据表;及当监听到所述筛选到的数据表迁移完毕时,删除所述外部访问数据表。
- 根据权利要求16所述的存储介质,其特征在于,所述将筛选到的数据表导入所述迁入数据库地址对应的数据库,所述计算机可读指令被所述处理器执行时还执行以下步骤:确定筛选到的数据表之间的表依赖关系;根据所述表依赖关系确定数据表迁移顺序;及按照数据表迁移顺序将所述筛选到的数据表导入所述迁入数据库地址对应的数据库。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910419503.5 | 2019-05-20 | ||
| CN201910419503.5A CN110209652B (zh) | 2019-05-20 | 2019-05-20 | 数据表迁移方法、装置、计算机设备和存储介质 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020232884A1 true WO2020232884A1 (zh) | 2020-11-26 |
Family
ID=67787861
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2019/103170 Ceased WO2020232884A1 (zh) | 2019-05-20 | 2019-08-29 | 数据表迁移方法、装置、计算机设备和存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN110209652B (zh) |
| WO (1) | WO2020232884A1 (zh) |
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112434013A (zh) * | 2020-11-30 | 2021-03-02 | 中国建设银行股份有限公司 | 数据表迁移方法、装置、电子设备及存储介质 |
| CN113672596A (zh) * | 2021-08-30 | 2021-11-19 | 中国平安人寿保险股份有限公司 | 项目配置表处理方法、装置、设备及存储介质 |
| CN114443740A (zh) * | 2022-01-25 | 2022-05-06 | 阿里云计算有限公司 | 数据处理方法、装置、电子设备及存储介质 |
| CN115794943A (zh) * | 2022-11-18 | 2023-03-14 | 北京天融信网络安全技术有限公司 | 一种数据库同步的配置方法及装置 |
| CN115858490A (zh) * | 2022-11-29 | 2023-03-28 | 建信金融科技有限责任公司 | 一种数据迁移处理方法和装置 |
| CN117149907A (zh) * | 2023-08-31 | 2023-12-01 | 上海爱数信息技术股份有限公司 | 数据同步方法、装置、设备及介质 |
| CN117171134A (zh) * | 2023-09-05 | 2023-12-05 | 中国银行股份有限公司 | 数据迁移方法、装置、设备及介质 |
| CN117271478A (zh) * | 2023-10-16 | 2023-12-22 | 中国工商银行股份有限公司 | 数据迁移方法、装置、存储介质以及电子设备 |
Families Citing this family (20)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110928860B (zh) * | 2019-11-27 | 2023-06-20 | 中国银行股份有限公司 | 数据迁移方法和装置 |
| CN111125213A (zh) * | 2019-11-29 | 2020-05-08 | 北京数起科技有限公司 | 数据采集的方法、装置及其系统 |
| CN111177113B (zh) * | 2019-12-06 | 2023-07-25 | 中国平安财产保险股份有限公司 | 数据迁移方法、装置、计算机设备和存储介质 |
| CN112988860B (zh) * | 2019-12-18 | 2023-09-26 | 菜鸟智能物流控股有限公司 | 数据加速处理方法、装置及电子设备 |
| CN113268480B (zh) * | 2020-02-17 | 2024-09-10 | 腾讯科技(深圳)有限公司 | 数据转移方法、装置、计算机可读存储介质和计算机设备 |
| CN111367890A (zh) * | 2020-03-13 | 2020-07-03 | 深圳壹账通智能科技有限公司 | 一种数据迁移的方法、装置、计算机设备及可读存储介质 |
| CN111694812A (zh) * | 2020-05-06 | 2020-09-22 | 五八有限公司 | 一种数据迁移方法以及数据迁移装置 |
| CN112732423B (zh) * | 2020-12-30 | 2023-01-20 | 平安科技(深圳)有限公司 | 流程迁移方法、装置、设备及介质 |
| CN112883073B (zh) * | 2021-03-22 | 2024-04-05 | 北京同邦卓益科技有限公司 | 数据筛选方法、装置、设备、可读存储介质以及产品 |
| CN113312336B (zh) * | 2021-06-22 | 2025-02-18 | 中国农业银行股份有限公司 | 数据处理方法、装置、电子设备、存储介质及程序产品 |
| CN113761043B (zh) * | 2021-08-17 | 2024-08-16 | 紫金诚征信有限公司 | 数据提取方法、装置、计算机设备和存储介质 |
| CN114168532A (zh) * | 2021-12-14 | 2022-03-11 | 平安养老保险股份有限公司 | 迁移脚本构建方法、装置、计算机设备及可读存储介质 |
| CN114741356B (zh) * | 2022-04-20 | 2025-08-15 | 中国银行股份有限公司 | 一种jenkins job的迁移方法和迁移装置 |
| CN114756556B (zh) * | 2022-06-15 | 2022-09-27 | 建信金融科技有限责任公司 | 处理账户数据的方法、装置、电子设备和计算机可读介质 |
| CN115687722A (zh) * | 2022-11-09 | 2023-02-03 | 华夏基金管理有限公司 | 一种数据获取与处理的方法以及装置 |
| CN116010375A (zh) * | 2022-12-29 | 2023-04-25 | 珠海万力达电气自动化有限公司 | 一种异构数据库海量数据快速在线迁移方法及系统 |
| CN116775613A (zh) * | 2023-06-28 | 2023-09-19 | 中国建设银行股份有限公司 | 一种数据迁移方法、装置、电子设备及计算机可读介质 |
| CN117009318A (zh) * | 2023-08-07 | 2023-11-07 | 中国建设银行股份有限公司 | 数据迁移方法、装置、设备及存储介质 |
| CN117493302A (zh) * | 2023-09-28 | 2024-02-02 | 智慧互通科技股份有限公司 | 一种智能化数据迁移方法与装置 |
| CN117435578A (zh) * | 2023-11-08 | 2024-01-23 | 中国平安人寿保险股份有限公司 | 数据调度部署方法、装置、计算机设备及存储介质 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103257878A (zh) * | 2013-05-16 | 2013-08-21 | 浪潮通信信息系统有限公司 | 一种基于云计算的应用程序的跨平台平滑迁移方法 |
| US20140095522A1 (en) * | 2012-10-01 | 2014-04-03 | Oracle International Corporation | Reference data segmentation from single to multiple tables |
| US20150019478A1 (en) * | 2013-07-09 | 2015-01-15 | Oracle International Corporation | Dynamic migration script management |
| CN105956191A (zh) * | 2016-06-13 | 2016-09-21 | 浪潮(北京)电子信息产业有限公司 | 一种数据迁移的方法及系统 |
| CN107704597A (zh) * | 2017-10-13 | 2018-02-16 | 携程旅游网络技术(上海)有限公司 | 关系型数据库至Hive的ETL脚本创建方法 |
| CN108595644A (zh) * | 2018-04-26 | 2018-09-28 | 宁波银行股份有限公司 | 一种大数据平台运维管理系统 |
Family Cites Families (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6151608A (en) * | 1998-04-07 | 2000-11-21 | Crystallize, Inc. | Method and system for migrating data |
| US20060235899A1 (en) * | 2005-03-25 | 2006-10-19 | Frontline Systems, Inc. | Method of migrating legacy database systems |
| CN101499063A (zh) * | 2008-01-31 | 2009-08-05 | 国际商业机器公司 | 基于跟踪的数据库模式演进方法及系统 |
| CN106708548A (zh) * | 2015-11-13 | 2017-05-24 | 阿里巴巴集团控股有限公司 | 程序升级方法和终端设备 |
| EP3467758A4 (en) * | 2016-06-06 | 2019-11-27 | Hitachi Systems, Ltd. | DATA MIGRATION SYSTEM AND DATA MIGRATION METHOD |
| US10649965B2 (en) * | 2016-11-14 | 2020-05-12 | International Business Machines Corporation | Data migration in a networked computer environment |
| CN107766132B (zh) * | 2017-06-25 | 2019-03-15 | 平安科技(深圳)有限公司 | 多任务调度方法、应用服务器及计算机可读存储介质 |
| CN107357896A (zh) * | 2017-07-13 | 2017-11-17 | 北京小度信息科技有限公司 | 数据库集群的扩容方法、装置、系统和数据库集群系统 |
| CN107992512A (zh) * | 2017-10-20 | 2018-05-04 | 中国建设银行股份有限公司上海市分行 | 一种数据迁移的方法、系统及计算机可读存储介质 |
| CN109684298B (zh) * | 2018-09-07 | 2024-02-20 | 平安科技(深圳)有限公司 | 数据库迁移方法、装置、设备及存储介质 |
| CN109766122A (zh) * | 2018-12-20 | 2019-05-17 | 平安信托有限责任公司 | 数据传输文件生成方法、装置、计算机设备和存储介质 |
-
2019
- 2019-05-20 CN CN201910419503.5A patent/CN110209652B/zh active Active
- 2019-08-29 WO PCT/CN2019/103170 patent/WO2020232884A1/zh not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20140095522A1 (en) * | 2012-10-01 | 2014-04-03 | Oracle International Corporation | Reference data segmentation from single to multiple tables |
| CN103257878A (zh) * | 2013-05-16 | 2013-08-21 | 浪潮通信信息系统有限公司 | 一种基于云计算的应用程序的跨平台平滑迁移方法 |
| US20150019478A1 (en) * | 2013-07-09 | 2015-01-15 | Oracle International Corporation | Dynamic migration script management |
| CN105956191A (zh) * | 2016-06-13 | 2016-09-21 | 浪潮(北京)电子信息产业有限公司 | 一种数据迁移的方法及系统 |
| CN107704597A (zh) * | 2017-10-13 | 2018-02-16 | 携程旅游网络技术(上海)有限公司 | 关系型数据库至Hive的ETL脚本创建方法 |
| CN108595644A (zh) * | 2018-04-26 | 2018-09-28 | 宁波银行股份有限公司 | 一种大数据平台运维管理系统 |
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112434013A (zh) * | 2020-11-30 | 2021-03-02 | 中国建设银行股份有限公司 | 数据表迁移方法、装置、电子设备及存储介质 |
| CN113672596A (zh) * | 2021-08-30 | 2021-11-19 | 中国平安人寿保险股份有限公司 | 项目配置表处理方法、装置、设备及存储介质 |
| CN114443740A (zh) * | 2022-01-25 | 2022-05-06 | 阿里云计算有限公司 | 数据处理方法、装置、电子设备及存储介质 |
| CN115794943A (zh) * | 2022-11-18 | 2023-03-14 | 北京天融信网络安全技术有限公司 | 一种数据库同步的配置方法及装置 |
| CN115858490A (zh) * | 2022-11-29 | 2023-03-28 | 建信金融科技有限责任公司 | 一种数据迁移处理方法和装置 |
| CN117149907A (zh) * | 2023-08-31 | 2023-12-01 | 上海爱数信息技术股份有限公司 | 数据同步方法、装置、设备及介质 |
| CN117149907B (zh) * | 2023-08-31 | 2026-04-07 | 上海爱数信息技术股份有限公司 | 数据同步方法、装置、设备及介质 |
| CN117171134A (zh) * | 2023-09-05 | 2023-12-05 | 中国银行股份有限公司 | 数据迁移方法、装置、设备及介质 |
| CN117271478A (zh) * | 2023-10-16 | 2023-12-22 | 中国工商银行股份有限公司 | 数据迁移方法、装置、存储介质以及电子设备 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110209652A (zh) | 2019-09-06 |
| CN110209652B (zh) | 2024-02-02 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2020232884A1 (zh) | 数据表迁移方法、装置、计算机设备和存储介质 | |
| CN112910945B (zh) | 请求链路跟踪方法和业务请求处理方法 | |
| CN111563368B (zh) | 报表生成方法、装置、计算机设备和存储介质 | |
| CN108197200B (zh) | 日志追踪方法、装置、计算机设备和存储介质 | |
| CN110008118B (zh) | 页面数据测试方法、装置、计算机设备和存储介质 | |
| WO2020151333A1 (zh) | 页面加载方法、装置、计算机设备和存储介质 | |
| US10754628B2 (en) | Extracting web API endpoint data from source code to identify potential security threats | |
| WO2020192134A1 (zh) | 基于Spring MVC的异常处理方法、装置、计算机设备和存储介质 | |
| CN111310427A (zh) | 业务数据配置处理方法、装置、计算机设备和存储介质 | |
| CN109389299B (zh) | 工作流流程部署方法、装置、计算机设备和存储介质 | |
| WO2020232883A1 (zh) | 脚本缺陷扫描方法、装置、计算机设备和存储介质 | |
| CN110245125B (zh) | 数据迁移方法、装置、计算机设备和存储介质 | |
| WO2021217846A1 (zh) | 接口数据处理方法、装置、计算机设备和存储介质 | |
| WO2021073510A1 (zh) | 一种数据库的统计方法及装置 | |
| CN111638873A (zh) | 程序代码的生成方法、装置、计算机设备及存储介质 | |
| CN111818175B (zh) | 企业服务总线配置文件生成方法、装置、设备和存储介质 | |
| WO2021120628A1 (zh) | 基于区块链的敏感词检测方法、装置、计算机设备和计算机可读存储介质 | |
| CN111124872A (zh) | 基于差异代码分析的分支检测方法、装置及存储介质 | |
| CN115357590A (zh) | 针对数据变更的记录方法、装置、电子设备及存储介质 | |
| CN113742338A (zh) | 工程验收表单结构化存储系统 | |
| CN115829768A (zh) | 基于规则引擎的数据计算方法、装置、设备及存储介质 | |
| CN112463799A (zh) | 数据提取方法、装置、设备及存储介质 | |
| JP2024505236A (ja) | データ処理システム用のデータセットマルチプレクサ | |
| US20140136578A1 (en) | Techniques to manage virtual files | |
| CN112579705A (zh) | 元数据采集方法、装置、计算机设备和存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19930137 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19930137 Country of ref document: EP Kind code of ref document: A1 |