WO2019001272A1 - 数据搬迁系统及方法 - Google Patents

数据搬迁系统及方法 Download PDF

Info

Publication number
WO2019001272A1
WO2019001272A1 PCT/CN2018/090903 CN2018090903W WO2019001272A1 WO 2019001272 A1 WO2019001272 A1 WO 2019001272A1 CN 2018090903 W CN2018090903 W CN 2018090903W WO 2019001272 A1 WO2019001272 A1 WO 2019001272A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
data table
relocation
processor
dividing
Prior art date
Application number
PCT/CN2018/090903
Other languages
English (en)
French (fr)
Inventor
刘四根
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019001272A1 publication Critical patent/WO2019001272A1/zh

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/21Design, administration or maintenance of databases
    • G06F16/215Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
    • 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/21Design, administration or maintenance of databases
    • G06F16/214Database migration support
    • 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

Definitions

  • the present application relates to the field of data management, and in particular, to a data relocation system and method.
  • the application provides a data relocation system that runs on a server.
  • the server is in communication with the database and is connected to one or more clients over a network.
  • the server receives the client data from one or more clients, and stores the client data generated by the client in the first preset time into the first data table, and the previously generated client data is stored in the second data table, the first data.
  • the table and the second data table are stored in the database.
  • the system includes:
  • a data dividing module configured to divide the first data table stored in the database into multiple data blocks
  • the data relocation module is configured to call a plurality of threads to read the plurality of data blocks from the first data table and write the second data table.
  • the application also provides a data relocation system, the system comprising:
  • a data receiving module configured to receive client data from a client, and store client data generated by one or more clients in a first preset time into the first data table;
  • a data dividing module configured to divide the first data table stored in the database into multiple data blocks
  • a data relocation module configured to call a plurality of threads to read the plurality of data blocks from the first data table, and write the second data table;
  • a data clearing module configured to clear the first data table
  • the checking module is configured to check whether the first data table has new data every second preset time, and if the first data table has new data, notify the data dividing module to perform data partitioning and perform Data relocation action.
  • the application further provides a data relocation method, the method comprising:
  • Data dividing step dividing the first data table stored in the database into a plurality of data blocks
  • Data relocation step calling a plurality of threads to read the plurality of data blocks from the first data table and writing the second data table.
  • the application also provides a data relocation method, the method comprising:
  • the data receiving step is: receiving client data from the client, and storing the client data generated by the one or more clients in the first preset time into the first data table;
  • Data dividing step dividing the first data table stored in the database into a plurality of data blocks
  • Data relocation step calling a plurality of threads to read the plurality of data blocks from the first data table, and writing the second data table;
  • Data clearing step emptying the first data table
  • Checking step checking whether the first data table has new data every second preset time.
  • the method flow returns to the data dividing step, and the data dividing and data relocation steps are performed on the first data table again.
  • the present application also provides a computer readable storage medium storing one or more computer programs, the one or more computer programs being executed by a processor, implementing the following steps:
  • Data dividing step dividing the first data table stored in the database into a plurality of data blocks
  • Data relocation step calling a plurality of threads to read the plurality of data blocks from the first data table and writing the second data table.
  • the present application is based on the principle of the logical structure of the database - the smallest memory unit data block of the data area is continuously allocated, that is, the physical address of the data stored in one data area is continuous, and the first data is
  • the table is divided into a plurality of data blocks, and a plurality of threads having the same number of divided data blocks are created, and the plurality of threads are called to simultaneously read the plurality of data blocks from the first data table, and write the second data table, thereby achieving A beneficial technical effect to improve the timeliness of data relocation.
  • FIG. 1 is an application environment diagram of a preferred embodiment of a data relocation system of the present application.
  • FIG. 2 is a diagram showing the operating environment of a preferred embodiment of the data relocation system of the present application.
  • FIG. 3 is a block diagram of a program of a first preferred embodiment of the data relocation system of the present application.
  • FIG. 4 is a block diagram of a program of a second preferred embodiment of the data relocation system of the present application.
  • FIG. 5 is a block diagram of a program of a third preferred embodiment of the data relocation system of the present application.
  • FIG. 6 is a block diagram of a program of a fourth preferred embodiment of the data relocation system of the present application.
  • FIG. 7 is a flow chart of a first preferred embodiment of a data relocation method of the present application.
  • FIG. 8 is a flow chart of a second preferred embodiment of the data relocation method of the present application.
  • FIG. 9 is a flow chart of a third preferred embodiment of the data relocation method of the present application.
  • FIG. 10 is a flow chart of a fourth preferred embodiment of the data relocation method of the present application.
  • FIG. 1 it is an application environment diagram of a preferred embodiment of the data relocation system 10 of the present application.
  • the data relocation system 10 is applied to the server 1.
  • the server 1 connects one or more clients 3 through the network 2.
  • the network 2 can be a network of a local area network, a wide area network, a metropolitan area network, etc., and can be a wired network or a wireless network.
  • the client 3 can be a desktop computer, a notebook, a tablet, a mobile phone, or other terminal device that can communicate with the server 1 via the network 2.
  • the server 1 includes, but is not limited to, a memory 11, a processor 12, and a display 13, and the server 1 is communicatively coupled to the database 14.
  • the memory 11 stores program code of the data relocation system 10, the memory 11 may include at least one type of storage medium, and the processor 12 reads and executes the program code of the data relocation system 10 from the memory 11, providing the following of the data relocation system 10 Features.
  • Display 13 displays the results of processor 12 executing the program code of data migration system 10.
  • Figure 2 shows only server 1 with components 11-13, it being understood that server 1 may include more or fewer components.
  • the database 14 stores a first data table 41 and a second data table 42.
  • the first data table 41 stores client data generated by the client manager in contact with the customer on the same day
  • the second data table 42 stores client data generated by the client manager in contact with the client.
  • the first data table 41 and the second data table 42 may store other data.
  • the first data table 41 may also store a company monthly sales record, where the second data table 42 stores the company. Sales records for the quarter.
  • the data relocation system 10 includes:
  • the data dividing module 120 is configured to divide the first data table 41 stored in the database 14 into a plurality of data blocks 411. Using the logical structure principle of the database 14 - the smallest memory cell data block of the data area is continuously allocated, that is, the physical address of the data stored in one data area is continuous, and the data partitioning module 120 stores the first data table stored in the database 14. 41 is divided into a plurality of data blocks 411. For example, when the execution time is 22:30, the data dividing module 120 divides the data stored in the first data table 41 of the database 14 into n data blocks 411.
  • the data relocation module 130 is configured to call a plurality of threads, read the plurality of data blocks 411 from the first data table 41, and write the second data table 42.
  • the server 1 creates a plurality of threads, and the data relocation module 130 invokes m threads to perform parallel processing while performing a relocation operation, and writes n data blocks 411 in the first data table 41 into the second data table stored in the database 14. 42.
  • the data relocation system 10 includes:
  • the data receiving module 110 is configured to receive the client data from the client 3, and store the client data generated by the one or more clients 3 in the first preset time into the first data table 41.
  • the data receiving module 110 passes the data obtained by the account manager through the mobile phone and the customer by sending a short message or telephone communication between the first preset time 6:00-22:00, such as: customer information, business requirements, etc.
  • the client 3 uploads to the first data table 41 and stores it in the database 14.
  • the data dividing module 120 is configured to divide the data stored in the first data table 41 of the database 14 into a plurality of data blocks 411. For example, when the execution time is 22:30, the data dividing module 120 divides the data stored in the first data table 41 of the database 14 into n data blocks 411.
  • the data relocation module 130 is configured to call a plurality of threads, read the plurality of data blocks 411 from the first data table 41, and write the second data table 42.
  • the server 1 creates a plurality of threads, and the data relocation module 130 invokes m threads to perform parallel processing while performing a relocation operation, and writes n data blocks 411 in the first data table 41 into the second data table stored in the database 14. 42.
  • the data relocation system 10 includes:
  • the data receiving module 110 is configured to receive the client data from the client 3, and store the client data generated by the one or more clients 3 in the first preset time into the first data table 41.
  • the data receiving module 110 passes the data obtained by the account manager through the mobile phone and the customer by sending a short message or telephone communication between the first preset time 6:00-22:00, such as: customer information, business requirements, etc.
  • the client 3 uploads to the first data table 41 and stores it in the database 14.
  • the data dividing module 120 is configured to divide the data stored in the first data table 41 of the database 14 into a plurality of data blocks 411. For example, when the execution time is 22:30, the data dividing module 120 divides the data stored in the first data table 41 of the database 14 into n data blocks 411.
  • the data relocation module 130 is configured to call a plurality of threads, read the plurality of data blocks 411 from the first data table 41, and write the second data table 42.
  • the server 1 creates a plurality of threads, and the data relocation module 130 invokes m threads to perform parallel processing while performing a relocation operation, and writes n data blocks 411 in the first data table 41 into the second data table stored in the database 14. 42.
  • the data clearing module 140 is configured to clear the first data table 41. For example, after the data of the first data table 41 is relocated to the second data table 42, the data clearing module 140 clears the content of the first data table 41.
  • the data relocation system 10 includes:
  • the data receiving module 110 is configured to receive the client data from the client 3, and store the client data generated by the one or more clients 3 in the first preset time into the first data table 41.
  • the data receiving module 110 passes the data obtained by the account manager through the mobile phone and the customer by sending a short message or telephone communication between the first preset time 6:00-22:00, such as: customer information, business requirements, etc.
  • the client 3 uploads to the first data table 41 and stores it in the database 14.
  • the data dividing module 120 is configured to divide the data stored in the first data table 41 of the database 14 into a plurality of data blocks 411. For example, when the execution time is 22:30, the data dividing module 120 divides the data stored in the first data table 41 of the database 14 into n data blocks 411.
  • the data relocation module 130 is configured to call a plurality of threads, read the plurality of data blocks 411 from the first data table 41, and write the second data table 42.
  • the server 1 creates a plurality of threads, and the data relocation module 130 invokes m threads to perform parallel processing while performing a relocation operation, and writes n data blocks 411 in the first data table 41 into the second data table stored in the database 14. 42.
  • the data clearing module 140 is configured to clear the first data table 41. For example, after the data of the first data table 41 is relocated to the second data table 42, the data clearing module 140 clears the content of the first data table 41.
  • the checking module 150 is configured to check whether there is new data in the first data table 41. For example, the check module 150 checks whether there is new data in the first data table 41 every second preset time 24h. If it is checked that the first data table 41 has new data, the data dividing module 120 is notified to restart. The data is divided and the data relocation operation is performed; if it is checked that the first data table 41 has no new data, the data relocation operation is ended.
  • the data relocation method includes:
  • step S112 the data dividing module 120 divides the first data table 41 stored in the database 4 into a plurality of data blocks 411. For example, when the execution time is 22:30, the data division module 120 divides the first data table 41 stored in the database 14 into n data blocks 411.
  • step S113 the data relocation module 130 calls a plurality of threads of the server to read the plurality of data blocks 411 from the first data table 41, and writes the second data table 42.
  • the server 1 creates a plurality of threads
  • the data relocation module 130 calls m threads to perform parallel processing while performing a relocation operation, and writes n data blocks 411 into the second data table 42 stored in the database 14.
  • the method comprises:
  • the data receiving module 110 receives the client data from the client 3, and uploads the client data generated by the one or more clients 3 in the first preset time to the first data table 41.
  • the data receiving module 110 communicates the data obtained by the account manager with the client by sending a short message or telephone through the mobile phone during the first preset time between 6:00 and 22:00, such as: customer information, business requirements, and the like. It is uploaded to the first data table 41 and stored in the database 14.
  • step S112 the data dividing module 120 divides the first data table 41 stored in the database 4 into a plurality of data blocks 411. For example, when the execution time is 22:30, the data division module 120 divides the first data table 41 stored in the database 14 into n data blocks 411.
  • step S113 the data relocation module 130 calls a plurality of threads of the server to read the plurality of data blocks 411 from the first data table 41, and writes the second data table 42.
  • the server 1 creates a plurality of threads
  • the data relocation module 130 calls m threads to perform parallel processing while performing a relocation operation, and writes n data blocks 411 into the second data table 42 stored in the database 14.
  • the method comprises:
  • the data receiving module 110 receives the client data from the client 3, and uploads the client data generated by the one or more clients 3 in the first preset time to the first data table 41.
  • the data receiving module 110 communicates the data obtained by the account manager with the client by sending a short message or telephone through the mobile phone during the first preset time between 6:00 and 22:00, such as: customer information, business requirements, and the like. It is uploaded to the first data table 41 and stored in the database 14.
  • step S112 the data dividing module 120 divides the first data table 41 stored in the database 4 into a plurality of data blocks 411. For example, when the execution time is 22:30, the data division module 120 divides the first data table 41 stored in the database 14 into n data blocks 411.
  • step S113 the data relocation module 130 calls a plurality of threads of the server to read the plurality of data blocks 411 from the first data table 41, and writes the second data table 42.
  • the server 1 creates a plurality of threads
  • the data relocation module 130 calls m threads to perform parallel processing while performing a relocation operation, and writes n data blocks 411 into the second data table 42 stored in the database 14.
  • step S114 the data clearing module 140 clears the first data table 41. For example, after the data of the first data table 41 is relocated to the second data table 42, the data clearing module 140 clears the content of the first data table 41.
  • the method comprises:
  • the data receiving module 110 receives the client data from the client 3, and uploads the client data generated by the one or more clients 3 in the first preset time to the first data table 41.
  • the data receiving module 110 communicates the data obtained by the account manager with the client by sending a short message or telephone through the mobile phone during the first preset time between 6:00 and 22:00, such as: customer information, business requirements, and the like. It is uploaded to the first data table 41 and stored in the database 14.
  • step S112 the data dividing module 120 divides the first data table 41 stored in the database 4 into a plurality of data blocks 411. For example, when the execution time is 22:30, the data division module 120 divides the first data table 41 stored in the database 14 into n data blocks 411.
  • step S113 the data relocation module 130 calls a plurality of threads of the server to read the plurality of data blocks 411 from the first data table 41, and writes the second data table 42.
  • the server 1 creates a plurality of threads
  • the data relocation module 130 calls m threads to perform parallel processing while performing a relocation operation, and writes n data blocks 411 into the second data table 42 stored in the database 14.
  • step S114 the data clearing module 140 clears the first data table 41. For example, after the data of the first data table 41 is relocated to the second data table 42, the data clearing module 140 clears the content of the first data table 41.
  • step S115 the checking module 150 checks whether the first data table 41 has new data. For example, the check module 150 checks whether the first data table 41 has new data every second preset time 24h. If it is checked that the first data table 41 has new data, the process returns to step S112 and again to the first data. The data table performs steps S112 and S113; if it is checked that the first data table 41 has no new data, the data relocation operation is ended.
  • the present application also includes a computer readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (eg, SD or DX memory, etc.), a random access memory (RAM), a static Random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, and the like.
  • a computer readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (eg, SD or DX memory, etc.), a random access memory (RAM), a static Random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, and the like.
  • a computer readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (eg, SD or DX memory
  • the computer readable storage medium stores one or more computer programs that are executed by the processor to implement the following steps:
  • Data dividing step dividing the first data table stored in the database into a plurality of data blocks.
  • the data dividing module 120 divides the data stored in the first data table 41 of the database 14 into n data blocks 411.
  • Data relocation step calling a plurality of threads to read the plurality of data blocks from the first data table and writing the second data table.
  • the server 1 creates a plurality of threads
  • the data relocation module 130 invokes m threads to perform parallel processing while performing a relocation operation, and writes n data blocks 411 in the first data table 41 into the second data table stored in the database 14. 42.
  • the computer readable storage medium stores one or more computer programs, the one or more computer programs being executed by the processor, implementing the following steps:
  • Data dividing step dividing the first data table stored in the database into a plurality of data blocks.
  • the data dividing module 120 divides the data stored in the first data table 41 of the database 14 into n data blocks 411.
  • Data relocation step calling a plurality of threads to read the plurality of data blocks from the first data table and writing the second data table.
  • the server 1 creates a plurality of threads
  • the data relocation module 130 invokes m threads to perform parallel processing while performing a relocation operation, and writes n data blocks 411 in the first data table 41 into the second data table stored in the database 14. 42.
  • Data clearing step Empty the first data table. For example, after the data of the first data table 41 is relocated to the second data table 42, the data clearing module 140 clears the content of the first data table 41.
  • the checking step is to check whether the first data table has new data every preset time, and if the first data table has new data, return a data dividing step. For example, if the check module 150 checks that the first data table 41 has new data, it notifies the data dividing module 120 to perform data division and perform data relocation operation; if the first data table 41 is checked, there is no new data. , the end of the data relocation work.
  • first embodiment the “second embodiment”, the “third embodiment” and the “fourth embodiment” mentioned in the embodiment may be the same embodiment. It can also be a different embodiment.

Abstract

本申请提供了一种数据搬迁方法。该数据搬迁方法包括:数据划分步骤:将数据库存储的第一数据表划分为多个数据块;及数据搬迁步骤:调用多个线程从该第一数据表中读取该多个数据块,写入第二数据表。第一数据表、第二数据表存储于数据库中。使用该方法能提高数据搬迁时效性。本申请还提供一种数据搬迁系统。

Description

数据搬迁系统及方法
本申请要求于2017年6月25日提交中国专利局,申请号为201710493334.0、发明名称为“数据搬迁系统及方法”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据管理领域,尤其涉及一种数据搬迁系统及方法。
背景技术
移动互联时代,服务提供商在跟客户的沟通过程中,会产生大量的数据,这些数据通常需要被及时收集、备份,以备后需。例如,保险或金融客户经理通过多媒体(例如微信、电话、邮件)接触客户时,会产生大量的接触信息(文字、图片、视频、音频)。目前,通常简易的做法是将这些接触信息分为当日表和历史表进行存储,当天产生的接触信息存入当日表,以往产生的接触信息存入历史表,而当日表的数据需要每天人为搬迁至历史表。因此,需要一种数据搬迁的系统及方法。
发明内容
鉴于以上内容,有必要提供一种数据搬迁系统及方法,可以快速将数据从第一数据表搬迁至第二数据表,提高了数据搬迁的效率。
本申请提供一种数据搬迁系统,运行于服务器。该服务器与数据库通信连接、与一个或多个客户端通过网络连接。服务器从一个或多个客户端接收客户端数据,将客户端第一预设时间内产生的客户端数据存入第一数据表,以往产生的客户端数据存入第二数据表,第一数据表、第二数据表存储于数据库中。该系统包括:
数据划分模块,用于将数据库存储的第一数据表划分为多个数据块;及
数据搬迁模块,用于调用多个线程从该第一数据表中读取该多个数据块,写入第二数据表。
本申请还提供一种数据搬迁系统,该系统包括:
数据接收模块,用于从客户端接收客户端数据,将一个或多个客户端在第 一预设时间内产生的客户端数据存入该第一数据表;
数据划分模块,用于将数据库存储的第一数据表划分为多个数据块;
数据搬迁模块,用于调用多个线程从该第一数据表中读取该多个数据块,写入第二数据表;
数据清除模块,用于清空该第一数据表;及
检查模块,用于每隔第二预设时间,检查所述第一数据表是否有新的数据,若所述第一数据表有新的数据,通知所述数据划分模块重新进行数据划分并进行数据搬迁动作。
另外,本申请还提供一种数据搬迁方法,该方法包括:
数据划分步骤:将数据库存储的第一数据表划分为多个数据块;及
数据搬迁步骤:调用多个线程从该第一数据表中读取该多个数据块,写入第二数据表。
本申请还提供一种数据搬迁方法,该方法包括:
数据接收步骤:从客户端接收客户端数据,将一个或多个客户端在第一预设时间内产生的客户端数据存入第一数据表;
数据划分步骤:将数据库存储的第一数据表划分为多个数据块;
数据搬迁步骤:调用多个线程从该第一数据表中读取该多个数据块,写入第二数据表;
数据清除步骤:清空该第一数据表;
检查步骤:每隔第二预设时间,检查该第一数据表是否有新的数据;及
若第一数据表有新的数据,则方法流程返回数据划分步骤,再次对第一数据表执行数据划分、数据搬迁步骤。
此外,本申请还提供一种计算机可读存储介质,该存储介质存储有一个或多个计算机程序,该一个或多个计算机程序被处理器执行,实现以下步骤:
数据划分步骤:将数据库存储的第一数据表划分为多个数据块;及
数据搬迁步骤:调用多个线程从该第一数据表中读取该多个数据块,写入第二数据表。
与现有技术相比,本申请是利用数据库的逻辑结构的原理-数据区的最小存储单元数据块是连续分配的,也就是一个数据区中存储数据的物理地址是连续的,将第一数据表划分为多个数据块,创建与划分的数据块数量相同的多个线程,调用该多个线程同时从第一数据表中读取该多个数据块,写入第二数据表, 从而达到提高数据搬迁时效性的有益技术效果。
附图说明
图1为本申请数据搬迁系统较佳实施例的应用环境图。
图2为本申请数据搬迁系统较佳实施例的运行环境图。
图3为本申请数据搬迁系统第一个较佳实施例的程序模块图。
图4为本申请数据搬迁系统第二个较佳实施例的程序模块图。
图5为本申请数据搬迁系统第三个较佳实施例的程序模块图。
图6为本申请数据搬迁系统第四个较佳实施例的程序模块图。
图7为本申请数据搬迁方法第一个较佳实施例的流程图。
图8为本申请数据搬迁方法第二个较佳实施例的流程图。
图9为本申请数据搬迁方法第三个较佳实施例的流程图。
图10为本申请数据搬迁方法第四个较佳实施例的流程图。
具体实施方式
如图1所示,是本申请数据搬迁系统10较佳实施例的应用环境图。该数据搬迁系统10应用于服务器1。服务器1通过网络2连接一个或多个客户端3。网络2可以为局域网,广域网,城域网等等类型的网络,可以为有线网络,也可以为无线网络。客户端3可以为桌上型计算机、笔记本、平板电脑、手机,或其它可以通过网络2与服务器1进行通信的终端装置。
如图2所示,是本申请数据搬迁系统10较佳实施例的运行环境图。服务器1包括,但不仅限于,存储器11、处理器12及显示器13,服务器1与数据库14通信连接。
存储器11存储数据搬迁系统10的程序代码,该存储器11可以包括至少一种类型的存储介质,处理器12从存储器11读取并执行数据搬迁系统10的程序代码,提供数据搬迁系统10的下述功能。显示器13显示处理器12执行数据搬迁系统10的程序代码的结果。图2仅示出了具有组件11-13的服务器1,应当理解的是,服务器1可以包括更多或者更少的组件。
如图3所示,是本申请数据搬迁系统10第一个较佳实施例的程序模块图。数据库14存储有第一数据表41及第二数据表42。在本实施例中,该第一数据表41中储存有客户经理当日与客户接触产生的客户端数据,第二数据表42储 存有客户经理以往与客户接触产生的客户端数据。在其它实施例中,该第一数据表41、第二数据表42可以存储其它数据,例如该第一数据表41中还可以储存有公司当月销售记录,该第二数据表42中储存有公司本季度的销售记录。
在该第一个较佳实施例中,该数据搬迁系统10包括:
数据划分模块120,用于将存储于数据库14的第一数据表41划分为多个数据块411。利用数据库14的逻辑结构原理-数据区的最小存储单元数据块是连续分配的,也就是一个数据区中存储数据的物理地址是连续的,数据划分模块120将存储于数据库14的第一数据表41划分为多个数据块411。例如,到达执行时间22:30时,该数据划分模块120将存储于数据库14的第一数据表41里的数据划分为n个数据块411。
数据搬迁模块130,用于调用多个线程,从该第一数据表41中读取该多个数据块411,写入第二数据表42。例如,服务器1创建多个线程,该数据搬迁模块130调用m个线程并行处理,同时进行搬迁工作,将第一数据表41中的n个数据块411写入存储于数据库14的第二数据表42中。
如图4所示,是本申请数据搬迁系统10个较佳实施例第二个较佳实施例的程序模块图。在第二个较佳实施例中,该数据搬迁系统10包括:
数据接收模块110,用于从客户端3接收客户端数据,将一个或多个客户端3在第一预设时间内产生的客户端数据存入该第一数据表41。例如,该数据接收模块110将客户经理在第一预设时间6:00-22:00之间,通过手机与客户发送短信或电话沟通获得的数据,如:客户资料、业务需求等信息,通过客户端3上传至第一数据表41并保存于数据库14中。
数据划分模块120,用于将该存储于数据库14的第一数据表41中的数据划分为多个数据块411。例如,到达执行时间22:30时,该数据划分模块120将存储于数据库14的第一数据表41里的数据划分为n个数据块411。
数据搬迁模块130,用于调用多个线程,从该第一数据表41中读取该多个数据块411,写入第二数据表42。例如,服务器1创建多个线程,该数据搬迁模块130调用m个线程并行处理,同时进行搬迁工作,将第一数据表41中的n个数据块411写入存储于数据库14的第二数据表42中。
如图5所示,是本申请数据搬迁系统10个较佳实施例第三个较佳实施例的程序模块图。在第三个较佳实施例中,该数据搬迁系统10包括:
数据接收模块110,用于从客户端3接收客户端数据,将一个或多个客户端 3在第一预设时间内产生的客户端数据存入该第一数据表41。例如,该数据接收模块110将客户经理在第一预设时间6:00-22:00之间,通过手机与客户发送短信或电话沟通获得的数据,如:客户资料、业务需求等信息,通过客户端3上传至第一数据表41并保存于数据库14中。
数据划分模块120,用于将该存储于数据库14的第一数据表41中的数据划分为多个数据块411。例如,到达执行时间22:30时,该数据划分模块120将存储于数据库14的第一数据表41里的数据划分为n个数据块411。
数据搬迁模块130,用于调用多个线程,从该第一数据表41中读取该多个数据块411,写入第二数据表42。例如,服务器1创建多个线程,该数据搬迁模块130调用m个线程并行处理,同时进行搬迁工作,将第一数据表41中的n个数据块411写入存储于数据库14的第二数据表42中。
数据清除模块140,用于清空第一数据表41。例如,当第一数据表41的数据搬迁至所述第二数据表42完成后,该数据清除模块140将第一数据表41的内容清空。
如图6所示,是本申请数据搬迁系统10个较佳实施例第四个较佳实施例的程序模块图。在第四个较佳实施例中,该数据搬迁系统10包括:
数据接收模块110,用于从客户端3接收客户端数据,将一个或多个客户端3在第一预设时间内产生的客户端数据存入该第一数据表41。例如,该数据接收模块110将客户经理在第一预设时间6:00-22:00之间,通过手机与客户发送短信或电话沟通获得的数据,如:客户资料、业务需求等信息,通过客户端3上传至第一数据表41并保存于数据库14中。
数据划分模块120,用于将该存储于数据库14的第一数据表41中的数据划分为多个数据块411。例如,到达执行时间22:30时,该数据划分模块120将存储于数据库14的第一数据表41里的数据划分为n个数据块411。
数据搬迁模块130,用于调用多个线程,从该第一数据表41中读取该多个数据块411,写入第二数据表42。例如,服务器1创建多个线程,该数据搬迁模块130调用m个线程并行处理,同时进行搬迁工作,将第一数据表41中的n个数据块411写入存储于数据库14的第二数据表42中。
数据清除模块140,用于清空第一数据表41。例如,当第一数据表41的数据搬迁至所述第二数据表42完成后,该数据清除模块140将第一数据表41的内容清空。
检查模块150,用于检查第一数据表41里是否有新数据。例如,每隔第二预设时间24h,该检查模块150检查第一数据表41里是否有新数据,若检查出第一数据表41有新的数据,则通知所述数据划分模块120重新进行数据划分并进行数据搬迁动作;若检查出第一数据表41没有新的数据,则结束该数据搬迁工作。
如图7所示,是本申请数据搬迁方法第一个较佳实施例的流程图。在第一个较佳实施例中,该数据搬迁方法包括:
步骤S112,数据划分模块120将数据库4存储的第一数据表41划分为多个数据块411。例如,到达执行时间22:30时,该数据划分模块120将存储于数据库14的第一数据表41划分为n个数据块411。
步骤S113,数据搬迁模块130调用服务器的多个线程从该第一数据表41中读取该多个数据块411,写入第二数据表42。例如,服务器1创建多个线程,该数据搬迁模块130调用m个线程并行处理,同时进行搬迁工作,将n个数据块411写入存储于数据库14的第二数据表42中。
如图8所示,是本申请数据搬迁方法第二个较佳实施例的流程图。在第二个较佳实施例中,该方法包括:
步骤S111,数据接收模块110从客户端3接收客户端数据,将一个或多个客户端3在第一预设时间内产生的客户端数据上传至所述第一数据表41。例如,所述数据接收模块110将客户经理在第一预设时间6:00-22:00之间,通过手机与客户发送短信或电话沟通获得的数据,如:客户资料、业务需求等信息,上传至第一数据表41并保存于数据库14中。
步骤S112,数据划分模块120将数据库4存储的第一数据表41划分为多个数据块411。例如,到达执行时间22:30时,该数据划分模块120将存储于数据库14的第一数据表41划分为n个数据块411。
步骤S113,数据搬迁模块130调用服务器的多个线程从该第一数据表41中读取该多个数据块411,写入第二数据表42。例如,服务器1创建多个线程,该数据搬迁模块130调用m个线程并行处理,同时进行搬迁工作,将n个数据块411写入存储于数据库14的第二数据表42中。
如图9所示,是本申请数据搬迁方法第三个较佳实施例的流程图。在第三个较佳实施例中,该方法包括:
步骤S111,数据接收模块110从客户端3接收客户端数据,将一个或多个 客户端3在第一预设时间内产生的客户端数据上传至所述第一数据表41。例如,所述数据接收模块110将客户经理在第一预设时间6:00-22:00之间,通过手机与客户发送短信或电话沟通获得的数据,如:客户资料、业务需求等信息,上传至第一数据表41并保存于数据库14中。
步骤S112,数据划分模块120将数据库4存储的第一数据表41划分为多个数据块411。例如,到达执行时间22:30时,该数据划分模块120将存储于数据库14的第一数据表41划分为n个数据块411。
步骤S113,数据搬迁模块130调用服务器的多个线程从该第一数据表41中读取该多个数据块411,写入第二数据表42。例如,服务器1创建多个线程,该数据搬迁模块130调用m个线程并行处理,同时进行搬迁工作,将n个数据块411写入存储于数据库14的第二数据表42中。
步骤S114,数据清除模块140清空第一数据表41。例如,当所述第一数据表41的数据搬迁至所述第二数据表42完成后,该数据清除模块140将该第一数据表41的内容清空。
如图10所示,是本申请数据搬迁方法第四个较佳实施例的流程图。在第四个较佳实施例中,该方法包括:
步骤S111,数据接收模块110从客户端3接收客户端数据,将一个或多个客户端3在第一预设时间内产生的客户端数据上传至所述第一数据表41。例如,所述数据接收模块110将客户经理在第一预设时间6:00-22:00之间,通过手机与客户发送短信或电话沟通获得的数据,如:客户资料、业务需求等信息,上传至第一数据表41并保存于数据库14中。
步骤S112,数据划分模块120将数据库4存储的第一数据表41划分为多个数据块411。例如,到达执行时间22:30时,该数据划分模块120将存储于数据库14的第一数据表41划分为n个数据块411。
步骤S113,数据搬迁模块130调用服务器的多个线程从该第一数据表41中读取该多个数据块411,写入第二数据表42。例如,服务器1创建多个线程,该数据搬迁模块130调用m个线程并行处理,同时进行搬迁工作,将n个数据块411写入存储于数据库14的第二数据表42中。
步骤S114,数据清除模块140清空第一数据表41。例如,当所述第一数据表41的数据搬迁至所述第二数据表42完成后,该数据清除模块140将该第一数据表41的内容清空。
步骤S115,检查模块150检查该第一数据表41是否有新的数据。例如,每隔第二预设时间24h,该检查模块150检查该第一数据表41是否有新的数据,若检查出第一数据表41有新的数据,则返回步骤S112,再次对第一数据表执行步骤S112、步骤S113;若检查出第一数据表41没有新的数据,则结束该数据搬迁工作。
此外,本申请还包括一种计算机可读存储介质,该计算机可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等等。
在第一个较佳实施例中,该计算机可读存储介质存储有一个或多个计算机程序,该一个或多个计算机程序被处理器执行,实现以下步骤:
数据划分步骤:将数据库存储的第一数据表划分为多个数据块。例如,数据划分模块120将存储于数据库14的第一数据表41里的数据划分为n个数据块411。
数据搬迁步骤:调用多个线程从该第一数据表中读取该多个数据块,写入第二数据表。例如,服务器1创建多个线程,该数据搬迁模块130调用m个线程并行处理,同时进行搬迁工作,将第一数据表41中的n个数据块411写入存储于数据库14的第二数据表42中。
在第二个较佳实施例中,该计算机可读存储介质存储有一个或多个计算机程序,该一个或多个计算机程序被处理器执行,实现以下步骤:
数据划分步骤:将数据库存储的第一数据表划分为多个数据块。例如,该数据划分模块120将存储于数据库14的第一数据表41里的数据划分为n个数据块411。
数据搬迁步骤:调用多个线程从该第一数据表中读取该多个数据块,写入第二数据表。例如,服务器1创建多个线程,该数据搬迁模块130调用m个线程并行处理,同时进行搬迁工作,将第一数据表41中的n个数据块411写入存储于数据库14的第二数据表42中。
数据清除步骤:清空该第一数据表。例如,当第一数据表41的数据搬迁至所述第二数据表42完成后,该数据清除模块140将第一数据表41的内容清空。
检查步骤:每隔预设时间,检查所述第一数据表是否有新的数据,若所述 第一数据表有新的数据,则返回数据划分步骤。例如,该检查模块150在若检查出第一数据表41有新的数据,则通知所述数据划分模块120重新进行数据划分并进行数据搬迁动作;若检查出第一数据表41没有新的数据,则结束该数据搬迁工作。
需要说明的是,本实施方式中提到的“第一个实施例”、“第二个实施例”、“第三个实施例”及“第四个实施例”可以为相同的实施例,也可以为不同的实施例。
需要说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。

Claims (19)

  1. 一种数据搬迁方法,应用于服务器,其特征在于,该方法包括:
    数据划分步骤:将数据库存储的第一数据表划分为多个数据块;及
    数据搬迁步骤:调用多个线程从该第一数据表中读取该多个数据块,写入第二数据表。
  2. 如权利要求1所述的数据搬迁方法,其特征在于,所述数据划分步骤之前,还包括:
    数据接收步骤:从客户端接收客户端数据,将一个或多个客户端在第一预设时间内产生的客户端数据存入第一数据表。
  3. 如权利要求1所述的数据搬迁方法,其特征在于,所述数据搬迁步骤之后,还包括:
    数据清除步骤:清空该第一数据表。
  4. 如权利要求2所述的数据搬迁方法,其特征在于,所述数据搬迁步骤之后,还包括:
    数据清除步骤:清空该第一数据表。
  5. 如权利要求3所述的数据搬迁方法,其特征在于,所述数据清除步骤之后,还包括:
    检查步骤:每隔第二预设时间,检查该第一数据表是否有新的数据;及
    若第一数据表有新的数据,则方法流程返回数据划分步骤,再次对第一数据表执行数据划分、数据搬迁步骤。
  6. 如权利要求4所述的数据搬迁方法,其特征在于,所述数据清除步骤之后,还包括:
    检查步骤:每隔第二预设时间,检查该第一数据表是否有新的数据;及
    若第一数据表有新的数据,则方法流程返回数据划分步骤,再次对第一数据表执行数据划分、数据搬迁步骤。
  7. 一种服务器,其特征在于,所述服务器包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的数据搬迁系统,所述数据搬迁系统被所述处理器执行时实现如下步骤:
    数据划分步骤:将存储于数据库的第一数据表划分为多个数据块;及
    数据搬迁步骤:调用多个线程从该第一数据表中读取该多个数据块,写入 第二数据表。
  8. 如权利要求7所述的服务器,其特征在于,所述处理器还用于执行所述数据搬迁系统,以在数据划分步骤之前实现以下步骤:
    数据接收步骤:从客户端接收客户端数据,将一个或多个客户端在第一预设时间内产生的客户端数据存入第一数据表。
  9. 如权利要求7所述的服务器,其特征在于,所述处理器还用于执行所述数据搬迁系统,以实现以下步骤:
    数据清除步骤,在将该第一数据表中的多个数据块写入该第二数据表之后,清空该第一数据表。
  10. 如权利要求8所述的服务器,其特征在于,所述处理器还用于执行所述数据搬迁系统,以实现以下步骤:
    数据清除步骤,在将该第一数据表中的多个数据块写入该第二数据表之后,清空该第一数据表。
  11. 如权利要求9所述的服务器,其特征在于,所述处理器还用于执行所述数据搬迁系统,以在数据清除步骤之后实现以下步骤:
    检查步骤,用于每隔第二预设时间,检查所述第一数据表是否有新的数据,若所述第一数据表有新的数据,则再次对所述第一数据表执行数据划分、数据搬迁操作。
  12. 如权利要求10所述的服务器,其特征在于,所述处理器还用于执行所述数据搬迁系统,以在数据清除步骤之后实现以下步骤:
    检查步骤,用于每隔第二预设时间,检查所述第一数据表是否有新的数据,若所述第一数据表有新的数据,则再次对所述第一数据表执行数据划分、数据搬迁操作。
  13. 一种计算机可读存储介质,其特征在于,该计算机可读存储介质存储数据搬迁系统,该数据搬迁系统可被至少一个处理器执行,以使所述至少一个处理器执行以下步骤:
    数据划分步骤:将数据库存储的第一数据表划分为多个数据块;
    数据搬迁步骤:调用多个线程从该第一数据表中读取该多个数据块,写入第二数据表。
  14. 如权利要求13所述的计算机可读存储介质,其特征在于,所述处理器 还用于执行所述数据搬迁系统,以在数据划分步骤之前实现以下步骤:
    数据接收步骤:从客户端接收客户端数据,将一个或多个客户端在第一预设时间内产生的客户端数据存入第一数据表。
  15. 如权利要求13所述的计算机可读存储介质,其特征在于,所述处理器还用于执行所述数据搬迁系统,以实现以下步骤:
    数据清除步骤,在将该第一数据表中的多个数据块写入该第二数据表之后,清空该第一数据表。
  16. 如权利要求14所述的计算机可读存储介质,其特征在于,所述处理器还用于执行所述数据搬迁系统,以实现以下步骤:
    数据清除步骤,在将该第一数据表中的多个数据块写入该第二数据表之后,清空该第一数据表。
  17. 如权利要求15所述的计算机可读存储介质,其特征在于,所述处理器还用于执行所述数据搬迁系统,以在数据清除步骤之后实现以下步骤:
    检查步骤,用于每隔第二预设时间,检查所述第一数据表是否有新的数据,若所述第一数据表有新的数据,则再次对所述第一数据表执行数据划分、数据搬迁操作。
  18. 如权利要求16所述的计算机可读存储介质,,其特征在于,所述处理器还用于执行所述数据搬迁系统,以在数据清除步骤之后实现以下步骤:
    检查步骤,用于每隔第二预设时间,检查所述第一数据表是否有新的数据,若所述第一数据表有新的数据,则再次对所述第一数据表执行数据划分、数据搬迁操作。
  19. 一种计算机可读存储介质,其特征在于,该计算机可读存储介质存储数据搬迁系统,该数据搬迁系统可被至少一个处理器执行,以使所述至少一个处理器执行以下步骤:
    数据接收步骤:从客户端接收客户端数据,将一个或多个客户端在第一预设时间内产生的客户端数据存入第一数据表。
    数据划分步骤:将数据库存储的第一数据表划分为多个数据块;
    数据搬迁步骤:调用多个线程从该第一数据表中读取该多个数据块,写入第二数据表;
    数据清除步骤:清空该第一数据表;及
    检查步骤:每隔预设时间,检查所述第一数据表是否有新的数据,若所述 第一数据表有新的数据,则返回数据划分步骤。
PCT/CN2018/090903 2017-06-25 2018-06-12 数据搬迁系统及方法 WO2019001272A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710493334.0A CN107870960A (zh) 2017-06-25 2017-06-25 数据搬迁系统及方法
CN201710493334.0 2017-06-25

Publications (1)

Publication Number Publication Date
WO2019001272A1 true WO2019001272A1 (zh) 2019-01-03

Family

ID=61761533

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/090903 WO2019001272A1 (zh) 2017-06-25 2018-06-12 数据搬迁系统及方法

Country Status (2)

Country Link
CN (1) CN107870960A (zh)
WO (1) WO2019001272A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107870960A (zh) * 2017-06-25 2018-04-03 平安科技(深圳)有限公司 数据搬迁系统及方法
CN109492000A (zh) * 2018-10-09 2019-03-19 郑州云海信息技术有限公司 一种数据库表的复制方法及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030177146A1 (en) * 2002-03-18 2003-09-18 International Business Machines Corporation Method, system, and program product for migrating data from one data base management system to another data base management system
CN102855299A (zh) * 2012-08-16 2013-01-02 上海引跑信息科技有限公司 不中断服务条件下,分布式数据库迭代迁移的方法
CN104504122A (zh) * 2014-12-29 2015-04-08 浪潮(北京)电子信息产业有限公司 一种数据库迁移数据的验证方法及系统
CN107870960A (zh) * 2017-06-25 2018-04-03 平安科技(深圳)有限公司 数据搬迁系统及方法

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102081665A (zh) * 2008-12-10 2011-06-01 阿里巴巴集团控股有限公司 一种数据同步方法及装置
KR20150037364A (ko) * 2013-09-30 2015-04-08 삼성전자주식회사 캐시 마이그레이션 관리 방법 및 이를 적용한 호스트 시스템

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030177146A1 (en) * 2002-03-18 2003-09-18 International Business Machines Corporation Method, system, and program product for migrating data from one data base management system to another data base management system
CN102855299A (zh) * 2012-08-16 2013-01-02 上海引跑信息科技有限公司 不中断服务条件下,分布式数据库迭代迁移的方法
CN104504122A (zh) * 2014-12-29 2015-04-08 浪潮(北京)电子信息产业有限公司 一种数据库迁移数据的验证方法及系统
CN107870960A (zh) * 2017-06-25 2018-04-03 平安科技(深圳)有限公司 数据搬迁系统及方法

Also Published As

Publication number Publication date
CN107870960A (zh) 2018-04-03

Similar Documents

Publication Publication Date Title
US10042557B2 (en) Managing a set of blocks in a storage system
US20170140315A1 (en) Managing incident tickets in a cloud managed service environment
CN104601696A (zh) 服务处理方法、服务调用框架、装置和架构
CN111708589B (zh) 信息的处理系统、方法、设备及可读存储介质
US10031948B1 (en) Idempotence service
WO2019001272A1 (zh) 数据搬迁系统及方法
CN113271307A (zh) 数据组装方法、装置、计算机系统及存储介质
US9910737B2 (en) Implementing change data capture by interpreting published events as a database recovery log
CN109445966B (zh) 事件处理方法、装置、介质和计算设备
US10044823B2 (en) Social content aggregation
CN108429780B (zh) 关联系统间的数据调用系统及方法
CN110489392A (zh) 多租户间的数据访问方法、装置、系统、存储介质及设备
CN114218471A (zh) 数据查询方法、装置、系统、电子设备及存储介质
US11093292B2 (en) Identifying recurring actions in a hybrid integration platform to control resource usage
WO2021040838A1 (en) Point in time blob restore
CN115484149B (zh) 网络切换方法、网络切换装置、电子设备及存储介质
US10437711B1 (en) Framework for fault tolerant case creation
US11055630B2 (en) Multitemporal data analysis
CN117194344A (zh) 文件管理方法、装置和电子设备
CN115695342A (zh) 消息处理方法、装置、设备、介质和程序产品
US9866446B2 (en) Data retrieval system
CN113672459A (zh) 一种信息处理方法及装置、存储介质
CN114218198A (zh) 业务信息迁移方法、装置、设备及介质
CN117056340A (zh) 对账数据处理方法、装置、设备及存储介质
CN113535725A (zh) 数据库存储空间优化方法、装置、电子设备及存储介质

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 19/05/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18823770

Country of ref document: EP

Kind code of ref document: A1