A data migration system, method, apparatus, device, and medium

By converting data from the source database server into a format recognizable by the target database server and directly calculating trading indicators, the problem of low efficiency during data migration is solved, achieving efficient data migration and trading indicator calculation.

CN116775612BActive Publication Date: 2025-11-18CHINA CONSTRUCTION BANK +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310771629.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-27
Publication Date
2025-11-18
Estimated Expiration
2043-06-27

AI Technical Summary

Technical Problem

In existing technologies, when data is migrated from a source database server to a target database server, there is a problem of low efficiency in data retrieval by the target database server, especially when excessive CPU usage is avoided during insert and update operations.

Method used

The source database server unloads the data from the database software onto its disk, converts it into second data in a format recognizable by the target database server's disk, and sends it to the target database server in a specified format. The target database server then directly calculates the land transaction indicators, avoiding insert and update operations and improving data migration efficiency.

Benefits of technology

It achieves an efficient data migration process, enabling the target database server to quickly acquire data and calculate transaction indicators, thereby improving data migration efficiency and flexibility and ensuring the reliability of data synchronization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116775612B_ABST
    Figure CN116775612B_ABST
Patent Text Reader

Abstract

The application relates to the field of data processing, in particular to a data migration system, method, device, equipment and medium, and is used for solving the technical problem of low efficiency of target database server in acquiring data in the prior art. The system comprises a source database server and a target database server. The source database server is used for: unloading first data in database software into a disk of the source database server based on a specified format to obtain second data in the specified format, wherein the database software runs in the source database server, the first data is land transaction data corresponding to at least one region, and the specified format is a format recognized by the disk of the target database server; and sending the second data to the disk of the target database server. The target database server is used for: receiving the second data, storing the second data into the disk of the target database server, and calculating land transaction indexes corresponding to the at least one region based on the second data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing, specifically to a data migration system, method, apparatus, device, and medium. Background Technology

[0002] In existing technologies, there are two main methods for migrating data from a source database server to a target database server. The first method involves the source database server exporting its stored database table structure as a Structured Query Language (SQL) script. The target database server then needs to execute the SQL script to obtain the required data, which is time-consuming. The second method involves a migration tool acquiring data from the database software on the source database server and importing this data into the target database server's database software using insert and update statements. Insert and update operations consume significant amounts of CPU resources, resulting in low data migration efficiency. When the target database server only needs to retrieve data from the database software on the source database server locally, both of these methods suffer from the technical problem of low efficiency in data retrieval by the target database server. Summary of the Invention

[0003] This application provides a data migration system, method, apparatus, device, and medium to solve the technical problem of low efficiency in data acquisition by target database servers in the prior art.

[0004] In a first aspect, an embodiment of this application provides a data migration system, the system comprising a source database server and a target database server;

[0005] The source database server is used to: unload first data from the database software to the disk of the source database server based on a specified format, to obtain second data in the specified format, wherein the database software runs on the source database server, the first data is land transaction data corresponding to at least one region, and the specified format is a format recognized by the disk of the target database server; and send the second data to the disk of the target database server.

[0006] The target database server is used to: receive the second data, store the second data in the disk of the target database server; and calculate the land transaction index corresponding to the at least one region based on the second data.

[0007] In this solution, the source database server unloads the data from its database software to its disk, obtaining second data in a format recognizable by the target database server's disk. This second data is then sent to the target database server's disk, and the target database server calculates land transaction indicators based on it. This data migration avoids the high CPU consumption of insert and update operations, resulting in high migration efficiency. Furthermore, the target database server can directly calculate land transaction indicators based on the second data, thus ensuring high efficiency in acquiring the second data.

[0008] Optionally, when the source database server unloads the first data in the database software to the disk of the source database server based on a specified format, it is specifically used to: periodically detect newly added data in the database software at preset time intervals; unload the newly added data detected at the end of each cycle to the disk of the source database server; the first data is the newly added data detected at the end of any cycle.

[0009] In this approach, since the transaction data in the database software may be constantly updated and changed, the source database server periodically detects the newly added data in the database software, unloads the newly added data to the disk of the source database server, and then sends the newly added data to the target database server. This ensures that the transaction data in the target database server is constantly synchronized with the transaction data in the database software, improving the flexibility and reliability of the solution.

[0010] Optionally, when the source database server unloads the first data from the database software to its disk based on a specified format, it specifically performs the following: unloading the first data based on at least one thread, wherein the first data includes at least one first sub-data, the second data includes at least one second sub-data, the at least one thread corresponds one-to-one with the at least one first sub-data, the at least one thread corresponds one-to-one with the at least one second sub-data, and each of the at least one threads is used to unload the first sub-data corresponding to each thread to obtain the second sub-data corresponding to the first sub-data; when the source database server sends the second data to the disk of the target database server, it specifically performs the following: sending the at least one second sub-data based on the at least one thread.

[0011] This method unloads the first data based on at least one thread to obtain at least one second sub-data. This is equivalent to the first data being sharded into at least one second sub-data on the source database server. Sending at least one second sub-data based on at least one thread can improve data migration efficiency, thereby improving the efficiency of the target database server in obtaining the second data.

[0012] Optionally, the source database server is also used for:

[0013] The number of the at least one thread is determined based on the size of the first data or the creation time of the first data;

[0014] Create at least one thread according to the stated quantity.

[0015] This method allows the number of threads to be selected according to actual needs. For example, when the amount of data in the first data set is large, a larger number of threads can be selected. Alternatively, the longer the creation time of the first data set is and the larger the amount of data in the first data set is, the more threads can be selected, thus improving the flexibility of the solution.

[0016] Optionally, the system further includes a front-end device; the target data server is further configured to: send land transaction indicators corresponding to the at least one region to the source database server; the source database server is further configured to: receive land transaction indicators corresponding to the at least one region from the target database server; send the land transaction indicators corresponding to the at least one region to the front-end device; the front-end device is further configured to: receive land transaction indicators corresponding to the at least one region from the source database server; display the land transaction indicators corresponding to the at least one region; or, the target data server is further configured to: send land transaction indicators corresponding to the at least one region to the front-end device; the front-end device is further configured to: receive land transaction indicators corresponding to the at least one region from the target database server; display the land transaction indicators corresponding to the at least one region.

[0017] With this method, after determining the transaction indicators, the target database server can directly send the transaction indicators to the front-end device, which will then display them. Alternatively, the target database server can first send the transaction indicators to the source database server, which will then send them to the front-end device, which will then display them. This improves the flexibility of the solution.

[0018] Secondly, embodiments of this application provide a data migration method, the method being applied to a source database server, comprising:

[0019] The first data in the database software is unloaded to the disk of the source database server based on a specified format to obtain the second data in the specified format. The database software runs on the source database server, the first data is land transaction data corresponding to at least one region, and the specified format is the format recognized by the disk of the target database server.

[0020] The second data is sent to the disk of the target database server.

[0021] Optionally, the step of unloading the first data in the database software to the disk of the source database server based on a specified format includes: periodically detecting newly added data in the database software at preset time intervals; unloading the newly added data detected at the end of each cycle to the disk of the source database server; the first data is the newly added data detected at the end of any cycle.

[0022] Optionally, unloading the first data from the database software to the disk of the source database server based on a specified format includes: unloading the first data based on at least one thread, wherein the first data includes at least one first sub-data, the second data includes at least one second sub-data, the at least one thread corresponds one-to-one with the at least one first sub-data, the at least one thread corresponds one-to-one with the at least one second sub-data, and each thread in the at least one thread is used to unload the first sub-data corresponding to each thread to obtain the second sub-data corresponding to the first sub-data; sending the second data to the disk of the target database server includes: sending the at least one second sub-data based on the at least one thread.

[0023] Optionally, the method further includes: determining the number of the at least one thread based on the size of the first data or the creation time of the first data; and creating the at least one thread based on the number.

[0024] Optionally, the system further includes a front-end device, and the method further includes: receiving land transaction indicators corresponding to the at least one region from the target database server; and sending the land transaction indicators corresponding to the at least one region to the front-end device.

[0025] Thirdly, embodiments of this application provide a data migration method, the method being applied to a target database server, comprising:

[0026] Receive second data from the source database server and store the second data into the disk of the target database server;

[0027] Based on the second data, calculate the land transaction index for at least one region.

[0028] Optionally, the system further includes a front-end device, and the method further includes: sending land transaction indicators corresponding to the at least one region to the source database server; or, sending land transaction indicators corresponding to the at least one region to the front-end device.

[0029] Fourthly, this application provides a data migration apparatus, which includes modules / units / technical means for performing the method described in the second aspect.

[0030] For example, the device may include:

[0031] The processing module is used to unload first data from the database software to the disk of the source database server based on a specified format, to obtain second data in the specified format, wherein the database software runs on the source database server, the first data is land transaction data corresponding to at least one region, and the specified format is a format recognized by the disk of the target database server.

[0032] The transceiver module is used to send the second data to the disk of the target database server.

[0033] Optionally, the processing module is specifically used to: periodically detect newly added data in the database software according to a preset time interval; unload the newly added data detected after each cycle to the disk of the source database server; the first data is the newly added data detected after the end of any cycle.

[0034] Optionally, the processing module is specifically used to: unload the first data based on at least one thread, wherein the first data includes at least one first sub-data, the second data includes at least one second sub-data, the at least one thread corresponds one-to-one with the at least one first sub-data, the at least one thread corresponds one-to-one with the at least one second sub-data, and each of the at least one threads is used to unload the first sub-data corresponding to each thread to obtain the second sub-data corresponding to the first sub-data; the transceiver module is specifically used to: send the at least one second sub-data based on the at least one thread.

[0035] Optionally, the processing module is further configured to: determine the number of the at least one thread based on the size of the first data or the creation time of the first data; and create the at least one thread based on the number.

[0036] Optionally, the processing module is further configured to: receive land transaction indicators corresponding to the at least one region from the target database server; the transceiver module is further configured to: send the land transaction indicators corresponding to the at least one region to the front-end device.

[0037] Fifthly, according to an embodiment of this application, a data migration apparatus includes modules / units / technical means for performing the method described in the third aspect above.

[0038] For example, the device may include:

[0039] The transceiver module is used to receive second data from the source database server;

[0040] The processing module is used to store the second data into the disk of the target database server; and to calculate land transaction indicators for at least one region based on the second data.

[0041] Optionally, the transceiver module is further configured to: send land transaction indicators corresponding to the at least one region to the source database server; or send land transaction indicators corresponding to the at least one region to the front-end device.

[0042] In a sixth aspect, this application provides an electronic device, comprising: at least one processor; and a memory and a communication interface communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the at least one processor, by executing the instructions stored in the memory, causes the device to perform the method described in any one of the second aspect or any optional implementation of the second aspect, or the third aspect or any optional implementation of the third aspect.

[0043] In a seventh aspect, a computer-readable storage medium is provided for storing instructions that, when executed, cause the method described in any one of the second aspect or any optional implementation of the second aspect, or any one of the third aspect or any optional implementation of the third aspect, to be implemented.

[0044] Eighthly, the application provides a computer program product comprising: computer program code, which, when executed on a computer, causes the computer to perform any of the methods described in the second aspect or any optional implementation of the second aspect, or the third aspect or any optional implementation of the third aspect.

[0045] The technical effects or advantages of one or more technical solutions provided in the second to eighth aspects of this application can be explained by the corresponding technical effects or advantages of one or more technical solutions provided in the first aspect, and will not be repeated here. Attached Figure Description

[0046] Figure 1 A scenario diagram provided for an embodiment of this application;

[0047] Figure 2 A flowchart illustrating a data migration method provided in this application embodiment;

[0048] Figure 3 A flowchart illustrating another data migration method provided in this application embodiment;

[0049] Figure 4 A structural diagram of a data migration device provided in an embodiment of this application;

[0050] Figure 5 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0051] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.

[0052] The terms "first" and "second" in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising" and any variations thereof are intended to cover non-exclusive protection. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices. The term "multiple" in this application can mean at least two, for example, two, three, or more, and the embodiments of this application do not impose limitations.

[0053] The term "and / or" in the embodiments of this application is merely a description of the association relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.

[0054] The data collection, dissemination, and use in this application all comply with relevant national laws and regulations.

[0055] To facilitate understanding of the solutions in the embodiments of this application, the possible application scenarios of the embodiments of this application will be introduced below.

[0056] When a user needs to view land transaction indicators for at least one region on a front-end device (such as a mobile phone, computer, or other device with web viewing capabilities), the source database server can calculate the corresponding transaction indicators based on the land transaction data running in its own database software. If the volume of land transaction data is large, the user needs to wait a certain amount of time to obtain the required land transaction indicators. To address this, the source database server can migrate the transaction data running in its own database software to the disk of the target database server. A professional big data team can then pre-calculate the land transaction indicators on the target database server based on the land transaction data. This way, users can view the land transaction indicators in real time on the front-end device's webpage without waiting. However, in practical applications, data migration between databases presents a technical challenge: low efficiency in data retrieval by the target database server.

[0057] Therefore, the technical solution provided in this application can improve the efficiency of the target database server in obtaining data.

[0058] See Figure 1 This application provides a data migration system, which includes a source database server and a target database server.

[0059] The source database server is used to run database software, which is used to store and maintain land transaction data.

[0060] The target database server is used to calculate land transaction indicators.

[0061] Optionally, the data migration system may also include a front-end device for displaying trading metrics.

[0062] See Figure 2 This is a flowchart of a data migration method provided in an embodiment of this application, which is applied to... Figure 1 Taking the system shown as an example, the specific steps of this method are as follows:

[0063] S201: The source database server unloads the first data from the database software to the disk of the source database server based on the specified format, and obtains the second data in the specified format.

[0064] The database software runs on the source database server.

[0065] The database software can be MySQL, Oracle, SQL Server, etc. The initial data in the database software is in a format that the database software can recognize. However, the target database server's disk may not be able to recognize this initial data. Therefore, the source database server needs to unload the initial data into its disk in a specified format to obtain the second data in the specified format. The specified format is one that the target database server's disk can recognize.

[0066] The first data consists of land transaction data corresponding to at least one region. The first data has the same meaning as the second data, but the format is different. The region can be a geographical region, such as Central China, North China, East China, South China, Northwest China, Southwest China, or Northeast China; or it can be an administrative region, such as a province, county, township, or village; this application does not impose any restrictions.

[0067] For example, the first data consists of all land transaction data for a province. In a land transfer scenario, each transaction between a company and a farmer (e.g., contracting land from a farmer) generates a land transaction record. This record includes information such as the farmer's name, the price per acre, the transaction amount, and the location of the land. This data is stored in database software running on the source database server. In one possible implementation, the source database server unloads all data from the database software to its disk; that is, the first data consists of all data from the database software.

[0068] In another possible implementation, the source database server periodically detects newly added data in the database software at preset time intervals, and unloads the newly added data detected at the end of each cycle to the disk of the source database server. That is, the first data is the newly added data detected at the end of any cycle.

[0069] For example, the database software adds new data every day, and the source database server retrieves the data added the previous day at midnight every day.

[0070] Understandably, the preset time interval can be specified according to actual needs, such as one day in the example above, and this application does not impose any restrictions.

[0071] In this approach, since the transaction data in the database software may be constantly updated and changed, the source database server periodically detects the newly added data in the database software, unloads the newly added data to the disk of the source database server, and then sends the newly added data to the target database server. This ensures that the transaction data in the target database server is constantly synchronized with the transaction data in the database software, improving the flexibility and reliability of the solution.

[0072] In one possible implementation, the source database server unloads first data based on at least one thread to obtain second data. Specifically, the first data includes at least one first sub-data, and at least one thread corresponds one-to-one with at least one first sub-data. At least one thread unloads the first sub-data corresponding to each thread to the disk of the source database server according to a specified format to obtain second sub-data corresponding to each first sub-data. The second data includes at least one second sub-data, and at least one second sub-data corresponds one-to-one with at least one thread.

[0073] For example, the first data includes first sub-data a1 and a2, a1 and a2 correspond to threads b1 and b2 respectively. The source database server unloads a1 based on b1 to obtain the second sub-data c1, and unloads a2 based on b2 to obtain the second sub-data c2. The second data includes c1 and c2.

[0074] Understandably, the source database server can choose whether to unload the first data based on at least one thread, depending on the size of the first data. For example, if the first data is large when the source database server unloads it for the first time, it will unload the first data based on at least one thread. Subsequently, when the source database server unloads the first data daily, it can unload the first data based on a single thread, meaning that sharding the first data is not required.

[0075] This method unloads the first data based on at least one thread to obtain at least one second sub-data. This is equivalent to the first data being sharded into at least one second sub-data on the source database server. Sending at least one second sub-data based on at least one thread can improve data migration efficiency, thereby improving the efficiency of the target database server in obtaining the second data.

[0076] Optionally, the source database server determines the number of at least one thread based on the size of the first data, and then creates that number of threads.

[0077] For example, the number of at least one thread is proportional to the size of the first data; the larger the amount of the first data, the larger the number of the first threads.

[0078] Optionally, the source database server determines the number of at least one thread based on the creation time of the first data, and then creates that number of threads.

[0079] Specifically, the first data includes multiple data tables. The source database server obtains the time difference corresponding to each data table based on its earliest and latest creation times. The duration corresponding to one thread is defined as Y. If the time difference corresponding to a data table is X, then the data table is divided into X / Y slices (i.e., X / Y first sub-data). The time period corresponding to each first sub-data is calculated and imported into the SQL query statement. The source database server creates the same number of threads as the number of first sub-data, i.e., X / Y threads corresponding to this data table. Each thread searches for the corresponding first sub-data based on the SQL query statement and unloads it to the disk of the source database server. Understandably, the value of Y can be specified according to actual needs; this application does not impose any restrictions.

[0080] For example, if the earliest creation time of a data table is 9:00 AM and the latest creation time is 10:00 AM, then the time difference corresponding to this data table is 1 hour. If the time difference X corresponding to a thread is half an hour, then this data table includes two first sub-data sets: data generated between 9:00 and 9:30 AM and data generated between 9:30 and 10:00 AM respectively. Each first sub-data set corresponds to one thread. The time periods 9:00 to 9:30 AM and 9:30 to 10:00 AM are stored in SQL query statements. Each thread searches for the corresponding first sub-data set based on the SQL query statement and unloads it to the disk of the source database server.

[0081] This method allows the number of threads to be selected according to actual needs. For example, when the amount of data in the first data set is large, a larger number of threads can be selected. Alternatively, the longer the creation time of the first data set is and the larger the amount of data in the first data set is, the more threads can be selected, thus improving the flexibility of the solution.

[0082] S202: The source database server sends the second data to the disk of the target database server; correspondingly, the target database server receives the second data and stores it in the disk of the target database server.

[0083] Optionally, the source database server sends second data to the target database server's disk based on the target database server's Internet Protocol (IP) address.

[0084] In one possible implementation, the source database server sends at least one second piece of data based on at least one thread.

[0085] Using the example above where the first data includes the first sub-data a1 and a2, thread b1 sends the second sub-data c1 to the disk of the target database server via the network, and thread b2 sends the second sub-data c2 to the disk of the target database server via the network. That is, each thread sends its corresponding second sub-data to the disk of the target database server.

[0086] S203: The target database server calculates land transaction indicators for at least one region based on the second data.

[0087] Following the example in S201 where the first data in the land transfer scenario is all the land transaction data of a province, land transaction indicators can include indicators such as the total number of land transactions in the province, the total transaction amount of land transactions in the province, the total number of land transactions in each city under the province, and the total transaction amount of land transactions in each city under the province.

[0088] In one possible implementation, after calculating the land transaction indicators corresponding to at least one region, the target database server sends the land transaction indicators corresponding to at least one region to the source database server. The source database server then sends the land transaction indicators corresponding to at least one region to the front-end device, which displays the land transaction indicators corresponding to at least one region.

[0089] In another possible implementation, after calculating the land transaction indicators for at least one region, the target database server sends the land transaction indicators for at least one region to the front-end device, and the front-end device displays the land transaction indicators for at least one region.

[0090] With this method, after determining the transaction indicators, the target database server can directly send the transaction indicators to the front-end device, which will then display them. Alternatively, the target database server can first send the transaction indicators to the source database server, which will then send them to the front-end device, which will then display them. This improves the flexibility of the solution.

[0091] To better understand the technical solutions of the embodiments of this application, a more complete example is given below.

[0092] See Figure 3If the source database server is migrating data to the target database server for the first time, the first data consists of all the data in the database software. Based on the earliest and latest creation times of each data table in the first data, the time difference corresponding to each data table is obtained. Based on the time difference, each data table is divided into multiple pieces, with each piece representing a first sub-data. In this way, the first data is divided into at least one first sub-data. The time period corresponding to each first sub-data is imported into an SQL query statement. Based on at least one thread, the first data is unloaded from the database software to the disk of the source database server to obtain the second data, and then the second data is sent to the target database server.

[0093] If the source database server is not migrating data to the target database server for the first time, the first data is the data added from the last data migration time to the current time. The time period corresponding to the last data migration time and the current time is imported into the SQL query statement. The first data is unloaded from the database software to the disk of the source database server to obtain the second data, and then the second data is sent to the target database server.

[0094] The big data team pre-calculates relevant transaction indicators based on transaction data on the target database server. The target database server can directly send the land transaction indicators to the front-end devices, or it can first send the land transaction indicators to the source database server, which then sends them to the front-end devices. With these pre-calculated land transaction indicators, users can view the results in real-time on the front-end device's webpage without waiting.

[0095] In this solution, the source database server unloads data from its database software to its disk, obtaining second data in a format recognizable by the target database server's disk. This second data is then sent to the target database server's disk, and the target database server calculates transaction metrics based on it. This approach avoids the high CPU consumption of insert and update operations during data migration, resulting in high migration efficiency. Furthermore, the target database server can directly calculate transaction metrics based on the second data, thus ensuring high efficiency in acquiring the second data.

[0096] Based on the same technical concept, embodiments of this application provide a data migration apparatus 400, which includes modules / units / means for executing the methods performed by the source database server or the target database server in the above-described method embodiments. These modules / units / means can be implemented in software, hardware, or hardware executing corresponding software implementations.

[0097] See Figure 4The device 400 may include a processing module 401 and a transceiver module 402, which cooperate to perform some or all of the operations performed by the source database server or the target database server in the above method embodiments.

[0098] For example, when device 400 is applied to the source database server,

[0099] Processing module 401 is used to unload first data from database software to the disk of source database server based on a specified format to obtain second data in the specified format, wherein the database software runs on the source database server, the first data is land transaction data corresponding to at least one region, and the specified format is a format recognized by the disk of the target database server.

[0100] The transceiver module 402 is used to send the second data to the disk of the target database server.

[0101] For example, when device 400 is applied to a target database server,

[0102] The transceiver module 402 is used to receive second data from the source database server;

[0103] The processing module 401 is used to store the second data into the disk of the target database server; and to calculate the land transaction index corresponding to at least one region based on the second data.

[0104] It should be understood that all relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.

[0105] As one possible product form of the aforementioned device, see [link to product description]. Figure 5 This application also provides an electronic device 500, comprising:

[0106] At least one processor 501; and a communication interface 503 communicatively connected to the at least one processor 501; the at least one processor 501 causes the electronic device 500 to perform the method steps performed by any device in the above method embodiments through the communication interface 503 by executing instructions stored in the memory 502.

[0107] Optionally, the memory 502 is located outside the electronic device 500.

[0108] Optionally, the electronic device 500 includes the memory 502, which is connected to the at least one processor 501, and stores instructions executable by the at least one processor 501. (Appendix) Figure 5The dashed line indicates that memory 502 is optional for electronic device 500.

[0109] The processor 501 and the memory 502 can be coupled through an interface circuit or integrated together; no restriction is imposed here.

[0110] This application embodiment does not limit the specific connection medium between the processor 501, memory 502, and communication interface 503. This application embodiment... Figure 5 The processor 501, memory 502, and communication interface 503 are connected via a bus 504. Figure 5 The connections between other components are shown in bold and are for illustrative purposes only, not as limiting information. The bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, Figure 5 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0111] It should be understood that the processor mentioned in the embodiments of this application can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor, implemented by reading software code stored in memory.

[0112] For example, the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0113] It should be understood that the memory mentioned in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate Synchronous DRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct RAM (DR RAM).

[0114] It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA, or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, the memory (storage module) can be integrated into the processor.

[0115] It should be noted that the memories described herein are intended to include, but are not limited to, these and any other suitable types of memories.

[0116] As another possible product form, this application embodiment also provides a computer-readable storage medium for storing instructions that, when executed, cause a computer to perform the method steps executed by the client or server in the above method examples.

[0117] As another possible product form, this application embodiment also provides a computer program product containing instructions. The computer program product stores instructions that, when run on a computer, cause the computer to execute the method steps performed by the client or server in the above method embodiments.

[0118] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0119] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0120] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0121] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the functions specified in one or more boxes. Obviously, those skilled in the art can make various modifications and variations to this application without departing from the scope of this application. Therefore, this application also intends to include such modifications and variations if they fall within the scope of the claims of this application and their equivalents.

Claims

1. A data migration system, characterized in that, include: Source database server and target database server; The source database server is used to: unload first data from the database software to the disk of the source database server based on a specified format, to obtain second data in the specified format, wherein the database software runs on the source database server, the first data is land transaction data corresponding to at least one region, and the specified format is a format recognized by the disk of the target database server; and send the second data to the disk of the target database server. The source database server is further configured to: if the first data is all the data in the database software, then obtain the time difference corresponding to each data table based on the earliest creation time and the latest creation time of each data table in the first data, shard each data table based on the time difference to obtain multiple first sub-data, and unload the multiple first sub-data from the database software to the disk of the source database server based on multiple threads; The target database server is used to: receive the second data, store the second data in the disk of the target database server; and calculate the land transaction index corresponding to the at least one region based on the second data.

2. The system as described in claim 1, characterized in that, When the source database server unloads the first data from the database software to its disk based on a specified format, it is specifically used for: The database software periodically checks for newly added data at preset time intervals. The newly added data detected at the end of each cycle is unloaded to the disk of the source database server; the first data is the newly added data detected at the end of any cycle.

3. The system as described in claim 1 or 2, characterized in that, When the source database server unloads the first data from the database software to its disk based on a specified format, it is specifically used for: The first data is unloaded based on at least one thread, wherein the first data includes at least one first sub-data, the second data includes at least one second sub-data, the at least one thread corresponds one-to-one with the at least one first sub-data, the at least one thread corresponds one-to-one with the at least one second sub-data, and each thread in the at least one thread is used to unload the first sub-data corresponding to each thread to obtain the second sub-data corresponding to the first sub-data. When the source database server sends the second data to the disk of the target database server, it is specifically used for: The at least one second sub-data is sent based on the at least one thread.

4. The system as described in claim 3, characterized in that, The source database server is also used for: The number of the at least one thread is determined based on the size of the first data; Create at least one thread according to the stated quantity.

5. The system as described in claim 1, characterized in that... The system also includes front-end devices; The target database server is also used to: send land transaction indicators corresponding to the at least one region to the source database server; The source database server is further configured to: receive land transaction indicators corresponding to at least one region from the target database server; and send the land transaction indicators corresponding to the at least one region to the front-end device. The front-end device is further configured to: receive land transaction indicators corresponding to at least one region from the source database server; display the land transaction indicators corresponding to the at least one region; or, The target database server is also used to: send land transaction indicators corresponding to the at least one region to the front-end device; The front-end device is also configured to: receive land transaction indicators corresponding to at least one region from the target database server; and display the land transaction indicators corresponding to at least one region.

6. A data migration method, characterized in that, The method is applied to a data migration system, which includes a source database server and a target database server. The method includes: The source database server unloads first data from the database software to its disk based on a specified format, obtaining second data in the specified format. The database software runs on the source database server, the first data is land transaction data corresponding to at least one region, and the specified format is a format recognized by the target database server's disk. The second data is then sent to the target database server's disk. The unloading of the first data from the database software to the source database server's disk based on the specified format includes: if the first data is all data in the database software, then based on the earliest and latest creation times of each data table in the first data, the time difference corresponding to each data table is obtained; each data table is sharded based on the time difference to obtain multiple first sub-data; and the multiple first sub-data are unloaded from the database software to the source database server's disk based on multiple threads. The target database server receives second data from the source database server and stores the second data in the disk of the target database server; based on the second data, it calculates land transaction indicators corresponding to at least one region.

7. A data migration device, characterized in that, include: The processing module is used to unload first data from the database software to the disk of the source database server based on a specified format, to obtain second data in the specified format, wherein the database software runs on the source database server, the first data is land transaction data corresponding to at least one region, and the specified format is a format recognized by the disk of the target database server. A transceiver module is used to send the second data to the disk of the target database server; When the processing module unloads the first data in the database software to the disk of the source database server based on a specified format, it is configured to: if the first data is all the data in the database software, obtain the time difference corresponding to each data table according to the earliest creation time and the latest creation time of each data table in the first data, shard each data table based on the time difference to obtain multiple first sub-data, and unload the multiple first sub-data from the database software to the disk of the source database server based on multiple threads; The transceiver module is also used to receive second data from the source database server; The processing module is further configured to store the second data into the disk of the target database server; and calculate land transaction indicators for at least one region based on the second data.

8. An electronic device, characterized in that, include: At least one processor; And a memory and a communication interface that are communicatively connected to the at least one processor; The memory stores instructions executable by the at least one processor, which, by executing the instructions stored in the memory, causes the electronic device to perform the method of claim 6 through the communication interface.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed on a computer, cause the computer to perform the method as described in claim 6.

10. A computer program product, characterized in that, The computer program product includes: computer program code that, when run on a computer, causes the computer to perform the method as described in claim 6.

Citation Information

Patent Citations

  • Data migration method, system and device, electronic equipment and medium

    CN111913938A