A kind of data migration method, device, equipment and storage medium
Technical field
The present embodiments relate to Internet technical field more particularly to a kind of data migration method, device, equipment and deposit
Storage media.
Background technique
As e-commerce enters development climax, data volume increases, and there are old operation systems not to be able to satisfy client increasingly
The business demand of growth, therefore, people can carry out system upgrade to old service system, but how consequent is by old service
In system in system after a large amount of Data Migration to upgrading.
In the prior art, common data migration method is first to migrate storage business datum, suspends business on line after the completion,
Guarantee that there is no new business datums to enter old system, then migrates increment business datum again, then enable new system.
Based on above-mentioned prior art, when carrying out Data Migration, to guarantee the consistent of new-old system data
The case where property, there are interrupting service systems, so that the use to user is made troubles.Especially in financial field, business is solved
The unbroken problem of system is particularly important.
Summary of the invention
The embodiment of the invention provides a kind of data migration method, device, equipment and storage mediums, are not being interrupted with realizing
In the case where old service system, the full dose business datum in old service system is moved into new business system.
In a first aspect, the embodiment of the invention provides a kind of data migration methods, which comprises
Source storage business datum in the corresponding first database of first operation system is moved into the second operation system pair
The second database answered;
If receiving service request in the transition process of business datum, the service request is sent respectively to
One operation system and the second operation system;
The first increment business datum corresponding with the service request that first operation system generates is stored in the first number
According in library, the second increment business datum corresponding with the service request that the second operation system generates is stored in the second data
In library.
Second aspect, the embodiment of the invention also provides a kind of data migration device, described device includes:
Source storage business datum transferring module, for by the source storage industry in the corresponding first database of the first operation system
Data Migration be engaged in corresponding second database of the second operation system;
Service request sending module, if for receiving service request in the transition process of business datum, by institute
It states service request and is sent respectively to the first operation system and the second operation system;
Increment business datum memory module, corresponding with the service request first for generating the first operation system
Increment business datum is stored in first database, and corresponding with the service request second that the second operation system is generated increases
Amount business datum is stored in the second database.
The third aspect, the embodiment of the invention also provides a kind of equipment, the equipment includes:
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processing
Device realizes above-mentioned related any data migration method.
Fourth aspect, it is described the embodiment of the invention also provides a kind of storage medium comprising computer executable instructions
Computer executable instructions by computer processor when being executed for executing above-mentioned related any Data Migration
Method.
The embodiment of the present invention is by being sent to the first operation system and second for the service request in data migration process
The problem of operation system is handled simultaneously, is solved in data migration process, needs to interrupt old service system, realizes to old trade
The migration of full dose business datum in business system.
Detailed description of the invention
Fig. 1 is a kind of flow diagram for data migration method that the embodiment of the present invention one provides.
Fig. 2 is a kind of flow diagram of data migration method provided by Embodiment 2 of the present invention.
Fig. 3 is a kind of schematic diagram of the preferred embodiment for data migration method that the embodiment of the present invention three provides.
Fig. 4 is a kind of structural schematic diagram for data migration device that the embodiment of the present invention four provides.
Fig. 5 is a kind of structural schematic diagram for equipment that the embodiment of the present invention five provides.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just
Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Embodiment one
Fig. 1 is a kind of flow chart for data migration method that the embodiment of the present invention one provides, and the present embodiment is applicable to industry
The case where Data Migration is carried out between business system, this method can be executed by data migration device, which can be by software
And/or hardware is realized.This method specifically comprises the following steps:
S110, the source storage business datum in the corresponding first database of the first operation system is moved into the second business system
It unites corresponding second database.
In the present embodiment, operation system includes that the information system of specific aim support is carried out to business procession, wherein
Business procession includes but is not limited to that data input, business processing, file and database processing, file and report are generated and looked into
Ask treatment process etc..
Illustratively, the first operation system can be the operation system of old service system or pending data migration, the second business
System can be new business system or receive the operation system of data.Database is stored in the set of related data together,
Data processing is quickly and effectively carried out for user, magnetic disk, optical disc or tape etc. are usually stored in certain correlation and succession
On storage medium.
Illustratively, business datum include but be not limited to user input data and operation system to above-mentioned data carry out phase
Close the data generated after business processing.Source storage business datum includes all business datums before starting Data Migration.
Wherein, Data Migration, which can be, directly migrates to source storage business datum according to the data format of old service system
In new business system, it is also possible to after carrying out data mart modeling according to the data format of new business system to source storage business datum,
The business datum for meeting new business System Data Format of generation is moved in new business system.
If S120, receiving service request in the transition process of business datum, service request is sent respectively to
First operation system and the second operation system.
Wherein, the process of business datum migration, which can be, starts to carry out Data Migration to source storage business datum, deposits to source
The process until business datum migration is completed is measured, it is of course also possible to be to start to carry out Data Migration to source storage business datum, is arrived
Close the process until the processing of old service system.Wherein, it closes old service system and is included in the migration completion of source storage business datum
Later, process new business system verified.Old service system is closed if examining qualification, if verification is unqualified
Continue Data Migration, does not close old service system.Illustratively, service request includes but is not limited to input information, inquiry
Request, business handling request, removal request, modification request and downloading request etc..
Optionally, before Data Migration completion, response results of first operation system to the service request are pushed
Give downstream traffic system.Wherein, before Data Migration can be the migration completion of source storage business datum before completing, certainly,
It can be before completing to verify to new business system.Downstream traffic system includes the terminal traffic system of the first operation system service
The response results of generation are carried out pushing away for associated traffic data according to the system function of downstream traffic system by system, the first operation system
It send.Illustratively, downstream traffic system is banking system, and the first operation system is then by the business relevant to finance of generation
Data-pushing is to banking system.Wherein, downstream traffic system can be one, be also possible to multiple.
S130, the first increment business datum corresponding with service request that the first operation system generates is stored in the first number
According in library, the second increment business datum corresponding with service request that the second operation system generates is stored in the second database
In.
Wherein, increment business datum includes after storage business datum migration in source starts, and operation system generates new
Business datum.
Service request is sent respectively to old service system and new business system is handled, solution by the technical solution of the present embodiment
The problem of having determined when carrying out the migration of increment business datum, having needed terminal old service system has reached to complete in old service system
Measure the effect of business datum migration.
Based on the above technical solution, optionally, described will be in the corresponding first database of the first operation system
Source storage business datum moves to corresponding second database of the second operation system, comprising: by the first operation system corresponding
The first full dose synchronizing traffic data in one database is into third database, wherein the first full dose business datum includes that source is deposited
Measure business datum and the first increment business datum;The extraction source storage business datum from third database, and to the source storage
Business datum is handled, and target inventory business number corresponding to the second database corresponding with second operation system is obtained
According to;The target inventory business datum is written in the second database.
In one embodiment, illustratively, first database and the second database can be the height of storage service data
The storaging medium of fast low capacity, third database can be auxiliary high-capacity storage medium.The advantages of this arrangement are as follows improving
To the access speed of data file, increase the memory space of operation system.
In one embodiment, extraction source storage business datum can be to avoid to first database from third database
Access and resource occupation complete the migration to business datum while not influencing the first operation system functional response.At one
In embodiment, the format of the business datum of first database is different from the second database.Illustratively, to source storage business datum
It carries out handling can be formatting source storage business datum according to the requirement of the data format of the second database, when
So, it is also possible to being converted to source storage business datum format into preset intermediate form, then is counted by intermediate format conversion for second
According to the required data format in library.The advantages of this arrangement are as follows being not required to when carrying out the Data Migration between multiple databases
To develop different conversion methods respectively to each database respectively, it is only necessary to which the data of intermediate form are taken with different write-ins
Mode can complete the migration of data.The method for carrying out data processing to the business datum of the first operation system herein does not limit
It is fixed.
In one embodiment, usually by business datum write-in the common program language of database include load sentence and
Insert sentence.It wherein, is generally using load sentence carrying out mass data write-in.Load sentence is high speed from a text
Row is read in this document, and is fitted into a table, data are imported by way of importing file, is shortened data and is imported the time.This
Place is not construed as limiting the mode of data write-in database.
Embodiment two
Fig. 2 is a kind of flow chart of data migration method provided by Embodiment 2 of the present invention, the technical solution of the present embodiment
It is the further refinement on the basis of above-described embodiment.Optionally, on the basis of the above embodiments, further includes: according to downstream
The downstream traffic data of operation system verify the second increment business datum.
As shown in Fig. 2, the method for the present embodiment specifically may include following steps:
S210, the source storage business datum in the corresponding first database of the first operation system is moved into the second business system
It unites corresponding second database.
S220, the second increment business datum is verified according to the downstream traffic data of downstream traffic system.If school
Qualification is tested, then executes S221, if verification is unqualified, executes S222.
In one embodiment, when downstream operation system is financial system, such as banking system then can be under
The reconciliation file and the second increment business datum for swimming operation system are verified.Wherein, reconciliation file includes but is not limited to user
Name, borrowing balance, repayment amount, borrowing time, payback period and monthly information such as repayment amount.It is of course also possible to be by
Two increment business datums are verified with the first increment business datum.It, can be to the second increment business when carrying out data check
Data are corresponding one by one to be verified, and is also possible to compare verification according to the processing result of business datum.Herein to business
The mode of data check is not construed as limiting.
In one embodiment, carrying out verification to the second increment business datum can be periodically or non-periodically to the second increasing
Amount business datum is verified.Specifically, carrying out verification to the second increment business datum may include according to preset interval time pair
Second increment business datum is verified, is verified when there is the generation of the second increment business datum and specifically triggered in real time
Under the conditions of one or more of verify.Wherein, preset interval time can be real-time according to the relevant parameter of operation system
Adjustment, is such as configured according to the handling capacity of operation system, can also be set by the user fixed time interval.Such as when default
Between be spaced and can be 24 hours, it can the second increment business datum is verified in daily regular time o'clock.It is exemplary
, specific trigger condition can be source storage business datum migration completion etc..Herein to the frequency on the opportunity of verification and inspection
It is not construed as limiting.In one embodiment, optionally, judging verification, qualified preset condition can be the second increment business datum pair
Number than continuous indifference meets preset times.Illustratively, record verify every time as a result, Statistical Comparison indifference time
Number, if the number of continuous indifference meets preset times, then it is assumed that verification is qualified.Wherein, preset times can be according to verification
Frequency be configured, illustratively, preset times can be 5 times.
For example, it after completing the migration of source storage business datum, was verified with one day for interval time.First day
When being verified, the second increment business datum includes starting to migrate source storage business datum, is to this checking time
The business datum only generated.It is corresponding, pair in the downstream traffic system above-mentioned period can be obtained by the second operation system
Account file verifies the second increment business datum in the above-mentioned period according to the reconciliation file, if verification does not conform to
Lattice then execute subsequent step;When being verified within second day, to the second increasing after verification in first day until this checking time
Amount business datum is verified;When third day is verified, to second day verification after until this checking time second
Increment business datum is verified;And so on, record the result verified every time.When the number for verifying continuous indifference meets in advance
If when number, executing subsequent step.
Optionally, on the basis of the above embodiments, further includes: target inventory business datum is verified.Wherein, school
The mode tested is similar to the verification mode of the second increment business datum, and details are not described herein again.The advantages of this arrangement are as follows guaranteeing
The accuracy and integrality of target inventory business datum.
The service request is sent to the first operation system by S221, pause, and by the second operation system to service request
Response results be pushed to downstream traffic system.
S222, the second operation system is repaired, and by the first increment business datum caused by the first operation system
Move to the second database.
Wherein, when verifying unqualified, the reason of generating difference is analyzed.Illustratively, if it is by that verification is unqualified
Caused by the system problem of two operation systems, then the system of the second operation system is repaired, and by the first increment business number
According to moving to the second database.If verifying unqualified is such as the second increment business number as caused by the second increment business datum
It goes wrong according in storing process, then the first increment business datum is moved into the second database.Wherein, to the first increment industry
The mode that business data are migrated can be similar to the mode migrated to source storage business datum, and details are not described herein again.
The technical solution of the present embodiment, complete data on stock migration after, to the incremental data in new business system into
Row verification, while the accurate complete migration that ensure that incremental data, also completes the test to new business system, saves
To the time of the service switching of new and old operation system.
Embodiment three
Fig. 3 is a kind of schematic diagram of the preferred embodiment for data migration method that the embodiment of the present invention three provides.Such as Fig. 3 institute
Show, the method flow of the present embodiment includes:
Firstly, the source storage business datum in the corresponding first database of the first operation system is moved to the second business system
It unites corresponding second database.Wherein, the mode of source storage business datum migration can be the first operation system is corresponding
The first full dose synchronizing traffic data in first database is into third database, the extraction source storage from the third database
Business datum, and data mart modeling is carried out to source storage business datum, obtain the second database corresponding with the second operation system institute
Target inventory business datum is written in the second database by corresponding target inventory business datum using load sentence.
If during business datum migration, business front end receiver to service request is then distributed by service request
Service request is sent respectively to the first operation system and the second operation system by module, the first operation system is generated and industry
Business requests corresponding first increment business datum to be stored in first database, the second operation system is generated and service request
Corresponding second increment business datum is stored in the second database.Before Data Migration completion, by the first operation system pair
The accordingly result of service request is pushed to downstream traffic system, the synchronizing traffic data of generation into third database, and periodically
The reconciliation file for obtaining downstream traffic system carries out reconciliation to the first operation system.
After storage business datum migration in source is completed, the second operation system obtains the reconciliation text of downstream traffic system daily
Part verifies the second increment business datum not verified before this reconciliation, records each check results.If verification is not
Qualification, and the reason of leading to the problem of difference, is then repaired to the second operation system due to the second operation system, and by first
The migration of first increment business datum caused by operation system is synchronized to second database.If continuously verifying indifference
Number meets preset times, and such as 5 times, then it is assumed that verification is qualified, and service request is sent to the first operation system by pause, and by the
Two operation systems are pushed to downstream traffic system, corresponding second database of the second operation system to the response results of service request
In the second full dose synchronizing traffic data into third database, and periodically obtain downstream traffic system reconciliation file to second
Operation system carries out reconciliation.
Example IV Fig. 4 is a kind of schematic diagram for data migration device that the embodiment of the present invention four provides.The present invention is implemented
Data migration method provided by any embodiment of the invention can be performed in data migration device provided by example, and the present embodiment can fit
The case where for carrying out Data Migration between operation system.The data migration device includes: source storage business datum transferring module
310, service request sending module 320 and increment business datum memory module 330.
Source storage business datum transferring module 310, for depositing the source in the corresponding first database of the first operation system
Amount business datum moves to corresponding second database of the second operation system;
Service request sending module 320, if for receiving service request in the transition process of business datum, it will
The service request is sent respectively to the first operation system and the second operation system;
Increment business datum memory module 330, it is corresponding with the service request for generating the first operation system
First increment business datum is stored in first database, corresponding with the service request that the second operation system is generated
Two increment business datums are stored in the second database.
Service request is sent respectively to old service system and new business system is handled, solution by the technical solution of the present embodiment
The problem of having determined when carrying out the migration of increment business datum, having needed terminal old service system has reached to complete in old service system
Measure the effect of business datum migration.
Optionally, source storage business datum transferring module 310 includes:
First full dose synchronizing traffic data unit, for first in the corresponding first database of the first operation system is complete
Synchronizing traffic data is measured into third database, wherein the first full dose business datum includes source storage business datum and the
One increment business datum.
Source storage business data processing unit, for extracting the source storage business number from the third database
According to, and the source storage business datum is handled, it is right to obtain the second database institute corresponding with second operation system
The target inventory business datum answered.
Target inventory business datum writing unit, for the target inventory business datum to be written in the second database.
Optionally, described device further include:
Second increment business datum correction verification module, for the downstream traffic data according to downstream traffic system to described second
Increment business datum is verified.
Optionally, described device further include:
Response results sending module is used for before Data Migration completion, by first operation system to the business
The response results of request are pushed to downstream traffic system.
Optionally, described device further include:
Qualified module is examined, if qualified for verifying, the service request is sent to the first operation system by pause,
And second operation system is pushed to downstream traffic system to the response results of the service request.
Optionally, described device further include:
If disqualified upon inspection module repairs second operation system unqualified for verification, and by institute
It states the first increment business datum caused by the first operation system and moves to second database.
Optionally, the second increment business datum correction verification module includes:
Second increment business datum reconciliation unit, for the reconciliation file and second increment according to downstream traffic system
Business datum carries out reconciliation.
Data migration device provided by the embodiment of the present invention can be used for executing data provided by the embodiment of the present invention
Moving method has the corresponding function of execution method and beneficial effect.
Embodiment five
Fig. 5 is a kind of structural schematic diagram for equipment that the embodiment of the present invention five provides, and the embodiment of the present invention is in the present invention
The realization for stating any data migration method of embodiment provides service, can configure data described in the embodiment of the present invention three
Moving apparatus.
The equipment includes processor 40, memory 41, input unit 42 and output device 43;The number of processor 40 in equipment
It measures and can be one or more, in Fig. 4 by taking a processor 40 as an example;Processor 40, memory 41, input unit in equipment
42 can be connected with output device 43 by bus or other modes, in Fig. 4 for being connected by bus.
Memory 41 is used as a kind of computer readable storage medium, can be used for storing software program, journey can be performed in computer
Sequence and module, if the corresponding program instruction/module of device data moving method in the embodiment of the present invention is (for example, source storage
Business datum transferring module 310, service request sending module 320 and increment business datum memory module 330).Processor 40 is logical
Cross the operation software program, instruction and the module that are stored in memory 41, thereby executing equipment various function application and
Above-mentioned apparatus control method is realized in data processing.
Memory 41 can mainly include storing program area and storage data area, wherein storing program area can store operation system
Application program needed for system, at least one function;Storage data area, which can be stored, uses created data etc. according to terminal.This
Outside, memory 41 may include high-speed random access memory, can also include nonvolatile memory, for example, at least a magnetic
Disk storage device, flush memory device or other non-volatile solid state memory parts.In some instances, memory 41 can be further
Including the memory remotely located relative to processor 40, these remote memories can pass through network connection to equipment.It is above-mentioned
The example of network includes but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
Input unit 42 can be used for receiving the number or character information of input, and generate with the user setting of equipment and
The related key signals input of function control.Output device 43 may include that display screen etc. shows equipment.
By above equipment, the problem of solving when carrying out the migration of increment business datum, need terminal old service system,
Achieve the effect that migrate full dose business datum in old service system.
Embodiment six
The embodiment of the present invention six also provides a kind of storage medium comprising computer executable instructions, and the computer can be held
Row instruction is used to execute a kind of data migration method when being executed by computer processor, this method comprises:
Source storage business datum in the corresponding first database of first operation system is moved into the second operation system pair
The second database answered;
If receiving service request in the transition process of business datum, the service request is sent respectively to
One operation system and the second operation system;
The first increment business datum corresponding with the service request that first operation system generates is stored in the first number
According in library, the second increment business datum corresponding with the service request that the second operation system generates is stored in the second data
In library.
Certainly, a kind of storage medium comprising computer executable instructions, computer provided by the embodiment of the present invention
The method operation that executable instruction is not limited to the described above, can also be performed Data Migration provided by any embodiment of the invention
Relevant operation in method.
By the description above with respect to embodiment, it is apparent to those skilled in the art that, the present invention
It can be realized by software and required common hardware, naturally it is also possible to which by hardware realization, but in many cases, the former is more
Good embodiment.Based on this understanding, technical solution of the present invention substantially in other words contributes to the prior art
Part can be embodied in the form of software products, which can store in computer readable storage medium
In, floppy disk, read-only memory (Read-Only Memory, ROM), random access memory (Random such as computer
Access Memory, RAM), flash memory (FLASH), hard disk or CD etc., including some instructions are with so that a computer is set
Standby (can be personal computer, server or the network equipment etc.) executes method described in each embodiment of the present invention.
It is worth noting that, included each unit and module are only pressed in the embodiment of above-mentioned data migration device
It is divided, but is not limited to the above division according to function logic, as long as corresponding functions can be realized;In addition,
The specific name of each functional unit is also only for convenience of distinguishing each other, the protection scope being not intended to restrict the invention.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that
The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation,
It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention
It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also
It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.